diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-05-27 09:02:11 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-10-31 19:32:32 -0400 |
commit | eb5589a8f0dab7e29021344228856339e6a1249c (patch) | |
tree | d83790e5ac7feacba5b1832fbe7f8d2a39d76f65 /include/linux/pci_hotplug.h | |
parent | 7c926402a7e8c9b279968fd94efec8700ba3859e (diff) |
include: convert various register fcns to macros to avoid include chaining
The original implementations reference THIS_MODULE in an inline.
We could include <linux/export.h>, but it is better to avoid chaining.
Fortunately someone else already thought of this, and made a similar
inline into a #define in <linux/device.h> for device_schedule_callback(),
[see commit 523ded71de0] so follow that precedent here.
Also bubble up any __must_check that were used on the prev. wrapper inline
functions up one to the real __register functions, to preserve any prev.
sanity checks that were used in those instances.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'include/linux/pci_hotplug.h')
-rw-r--r-- | include/linux/pci_hotplug.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index 5d09cbafa7db..45fc162cbdc0 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
@@ -132,13 +132,9 @@ extern int pci_hp_deregister(struct hotplug_slot *slot); | |||
132 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, | 132 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, |
133 | struct hotplug_slot_info *info); | 133 | struct hotplug_slot_info *info); |
134 | 134 | ||
135 | static inline int pci_hp_register(struct hotplug_slot *slot, | 135 | /* use a define to avoid include chaining to get THIS_MODULE & friends */ |
136 | struct pci_bus *pbus, | 136 | #define pci_hp_register(slot, pbus, devnr, name) \ |
137 | int devnr, const char *name) | 137 | __pci_hp_register(slot, pbus, devnr, name, THIS_MODULE, KBUILD_MODNAME) |
138 | { | ||
139 | return __pci_hp_register(slot, pbus, devnr, name, | ||
140 | THIS_MODULE, KBUILD_MODNAME); | ||
141 | } | ||
142 | 138 | ||
143 | /* PCI Setting Record (Type 0) */ | 139 | /* PCI Setting Record (Type 0) */ |
144 | struct hpp_type0 { | 140 | struct hpp_type0 { |