[2.6 patch] fix IPMI compile errors with PROC_FS=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes the following compile errors with CONFIG_PROC_FS=n:

<--  snip  -->

...
  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.)

<--  snip  -->


Signed-off-by: Adrian Bunk <[email protected]>

--- linux-2.6.14-rc5-mm1-modular-2.95/drivers/char/ipmi/ipmi_msghandler.c.old	2005-11-02 02:23:04.000000000 +0100
+++ linux-2.6.14-rc5-mm1-modular-2.95/drivers/char/ipmi/ipmi_msghandler.c	2005-11-02 02:23:26.000000000 +0100
@@ -57,6 +57,7 @@
 
 #ifdef CONFIG_PROC_FS
 struct proc_dir_entry *proc_ipmi_root = NULL;
+EXPORT_SYMBOL(proc_ipmi_root);
 #endif /* CONFIG_PROC_FS */
 
 #define MAX_EVENTS_IN_QUEUE	25
@@ -3298,6 +3299,5 @@
 EXPORT_SYMBOL(ipmi_set_my_LUN);
 EXPORT_SYMBOL(ipmi_get_my_LUN);
 EXPORT_SYMBOL(ipmi_smi_add_proc_entry);
-EXPORT_SYMBOL(proc_ipmi_root);
 EXPORT_SYMBOL(ipmi_user_set_run_to_completion);
 EXPORT_SYMBOL(ipmi_free_recv_msg);
--- linux-2.6.14-rc5-mm1-modular-2.95/drivers/char/ipmi/ipmi_poweroff.c.old	2005-11-02 02:31:09.000000000 +0100
+++ linux-2.6.14-rc5-mm1-modular-2.95/drivers/char/ipmi/ipmi_poweroff.c	2005-11-02 02:31:43.000000000 +0100
@@ -612,11 +612,14 @@
 #endif
 
 	rv = ipmi_smi_watcher_register(&smi_watcher);
+
+#ifdef CONFIG_PROC_FS
 	if (rv) {
 		unregister_sysctl_table(ipmi_table_header);
 		printk(KERN_ERR PFX "Unable to register SMI watcher: %d\n", rv);
 		goto out_err;
 	}
+#endif
 
  out_err:
 	return rv;
-
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]
  Powered by Linux