Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: Move cpci_hotplug_init() proto to header file

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>

+9 -8
+8
drivers/pci/hotplug/cpci_hotplug.h
··· 99 99 extern int cpci_configure_slot(struct slot *slot); 100 100 extern int cpci_unconfigure_slot(struct slot *slot); 101 101 102 + #ifdef CONFIG_HOTPLUG_PCI_CPCI 103 + int cpci_hotplug_init(int debug); 104 + void cpci_hotplug_exit(void); 105 + #else 106 + static inline int cpci_hotplug_init(int debug) { return 0; } 107 + static inline void cpci_hotplug_exit(void) { } 108 + #endif 109 + 102 110 #endif /* _CPCI_HOTPLUG_H */
+1 -8
drivers/pci/hotplug/pci_hotplug_core.c
··· 41 41 #include <linux/pci_hotplug.h> 42 42 #include <asm/uaccess.h> 43 43 #include "../pci.h" 44 + #include "cpci_hotplug.h" 44 45 45 46 #define MY_NAME "pci_hotplug" 46 47 ··· 63 62 64 63 static LIST_HEAD(pci_hotplug_slot_list); 65 64 static DEFINE_MUTEX(pci_hp_mutex); 66 - 67 - #ifdef CONFIG_HOTPLUG_PCI_CPCI 68 - extern int cpci_hotplug_init(int debug); 69 - extern void cpci_hotplug_exit(void); 70 - #else 71 - static inline int cpci_hotplug_init(int debug) { return 0; } 72 - static inline void cpci_hotplug_exit(void) { } 73 - #endif 74 65 75 66 /* Weee, fun with macros... */ 76 67 #define GET_STATUS(name,type) \