PCI: Move cpci_hotplug_init() proto to header file
authorBjorn Helgaas <bhelgaas@google.com>
Mon, 15 Apr 2013 16:44:18 +0000 (10:44 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 15 Apr 2013 16:44:18 +0000 (10:44 -0600)
cpci_hotplug_init() and cpci_hotplug_exit() are defined in
cpci_hotplug_core.c but had extern declarations in pci_hotplug_core.c.
This puts the declarations in a header file included both places so
the compiler can help keep everything consistent.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/cpci_hotplug.h
drivers/pci/hotplug/pci_hotplug_core.c

index 9fff878..3ae19f7 100644 (file)
@@ -99,4 +99,12 @@ extern int cpci_led_off(struct slot * slot);
 extern int cpci_configure_slot(struct slot *slot);
 extern int cpci_unconfigure_slot(struct slot *slot);
 
+#ifdef CONFIG_HOTPLUG_PCI_CPCI
+int cpci_hotplug_init(int debug);
+void cpci_hotplug_exit(void);
+#else
+static inline int cpci_hotplug_init(int debug) { return 0; }
+static inline void cpci_hotplug_exit(void) { }
+#endif
+
 #endif /* _CPCI_HOTPLUG_H */
index 202f4a9..6a25f4d 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/pci_hotplug.h>
 #include <asm/uaccess.h>
 #include "../pci.h"
+#include "cpci_hotplug.h"
 
 #define MY_NAME        "pci_hotplug"
 
@@ -63,14 +64,6 @@ static bool debug;
 static LIST_HEAD(pci_hotplug_slot_list);
 static DEFINE_MUTEX(pci_hp_mutex);
 
-#ifdef CONFIG_HOTPLUG_PCI_CPCI
-extern int cpci_hotplug_init(int debug);
-extern void cpci_hotplug_exit(void);
-#else
-static inline int cpci_hotplug_init(int debug) { return 0; }
-static inline void cpci_hotplug_exit(void) { }
-#endif
-
 /* Weee, fun with macros... */
 #define GET_STATUS(name,type)  \
 static int get_##name (struct hotplug_slot *slot, type *value)         \