提交 be4f1bb2 编写于 作者: A Adrian Bunk 提交者: Linus Torvalds

[PATCH] ipmi: fix compile errors with PROC_FS=n

...
  CC [M]  drivers/char/ipmi/ipmi_msghandler.o
drivers/char/ipmi/ipmi_msghandler.c:3301: `proc_ipmi_root' undeclared here (not in a function)
drivers/char/ipmi/ipmi_msghandler.c:3301: initializer element is not constant
drivers/char/ipmi/ipmi_msghandler.c:3301: (near initialization for `__ksymtab_proc_ipmi_root.value')
drivers/char/ipmi/ipmi_msghandler.c:1535: warning: `ipmb_file_read_proc' defined but not used
drivers/char/ipmi/ipmi_msghandler.c:1551: warning: `version_file_read_proc' defined but not used
drivers/char/ipmi/ipmi_msghandler.c:1561: warning: `stat_file_read_proc' defined but not used
...
  CC [M]  drivers/char/ipmi/ipmi_poweroff.o
drivers/char/ipmi/ipmi_poweroff.c: In function `ipmi_poweroff_init':
drivers/char/ipmi/ipmi_poweroff.c:616: warning: implicit declaration of function `unregister_sysctl_table'
drivers/char/ipmi/ipmi_poweroff.c:616: `ipmi_table_header' undeclared (first use in this function)
drivers/char/ipmi/ipmi_poweroff.c:616: (Each undeclared identifier is reported only once
drivers/char/ipmi/ipmi_poweroff.c:616: for each function it appears in.)
Signed-off-by: NAdrian Bunk <bunk@stusta.de>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 9c107805
...@@ -57,6 +57,7 @@ static int initialized = 0; ...@@ -57,6 +57,7 @@ static int initialized = 0;
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
struct proc_dir_entry *proc_ipmi_root = NULL; struct proc_dir_entry *proc_ipmi_root = NULL;
EXPORT_SYMBOL(proc_ipmi_root);
#endif /* CONFIG_PROC_FS */ #endif /* CONFIG_PROC_FS */
#define MAX_EVENTS_IN_QUEUE 25 #define MAX_EVENTS_IN_QUEUE 25
...@@ -3295,6 +3296,5 @@ EXPORT_SYMBOL(ipmi_get_my_address); ...@@ -3295,6 +3296,5 @@ EXPORT_SYMBOL(ipmi_get_my_address);
EXPORT_SYMBOL(ipmi_set_my_LUN); EXPORT_SYMBOL(ipmi_set_my_LUN);
EXPORT_SYMBOL(ipmi_get_my_LUN); EXPORT_SYMBOL(ipmi_get_my_LUN);
EXPORT_SYMBOL(ipmi_smi_add_proc_entry); EXPORT_SYMBOL(ipmi_smi_add_proc_entry);
EXPORT_SYMBOL(proc_ipmi_root);
EXPORT_SYMBOL(ipmi_user_set_run_to_completion); EXPORT_SYMBOL(ipmi_user_set_run_to_completion);
EXPORT_SYMBOL(ipmi_free_recv_msg); EXPORT_SYMBOL(ipmi_free_recv_msg);
...@@ -612,11 +612,14 @@ static int ipmi_poweroff_init (void) ...@@ -612,11 +612,14 @@ static int ipmi_poweroff_init (void)
#endif #endif
rv = ipmi_smi_watcher_register(&smi_watcher); rv = ipmi_smi_watcher_register(&smi_watcher);
#ifdef CONFIG_PROC_FS
if (rv) { if (rv) {
unregister_sysctl_table(ipmi_table_header); unregister_sysctl_table(ipmi_table_header);
printk(KERN_ERR PFX "Unable to register SMI watcher: %d\n", rv); printk(KERN_ERR PFX "Unable to register SMI watcher: %d\n", rv);
goto out_err; goto out_err;
} }
#endif
out_err: out_err:
return rv; return rv;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册