Initialise when userui code is loaded.
Signed-off-by: Nigel Cunningham <[email protected]>
kernel/power/ui.c | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/kernel/power/ui.c b/kernel/power/ui.c
index 3f2f549..83a0370 100644
--- a/kernel/power/ui.c
+++ b/kernel/power/ui.c
@@ -788,3 +788,34 @@ static struct suspend_module_ops userui_
.memory_needed = userui_memory_needed,
#endif
};
+
+/* suspend_console_proc_init
+ * Description: Boot time initialisation for user interface.
+ */
+static __init int suspend_console_proc_init(void)
+{
+ int result, i, numfiles = sizeof(proc_params) / sizeof(struct suspend_proc_data);
+
+ if (!(result = suspend_register_module(&userui_ops)))
+ for (i=0; i< numfiles; i++)
+ suspend_register_procfile(&proc_params[i]);
+
+#ifdef CONFIG_NET
+ ui_helper_data.nl = NULL;
+ ui_helper_data.program[0] = '\0';
+ ui_helper_data.pid = -1;
+ ui_helper_data.skb_size = sizeof(struct userui_msg_params);
+ ui_helper_data.pool_limit = 6;
+ ui_helper_data.netlink_id = NETLINK_SUSPEND2_USERUI;
+ ui_helper_data.name = "userspace ui";
+ ui_helper_data.rcv_msg = userui_user_rcv_msg;
+ ui_helper_data.interface_version = 6;
+ ui_helper_data.must_init = 0;
+ ui_helper_data.not_ready = suspend_cleanup_console;
+ init_completion(&ui_helper_data.wait_for_process);
+#endif
+
+ return result;
+}
+
+late_initcall(suspend_console_proc_init);
--
Nigel Cunningham nigel at suspend2 dot net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]