aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci_hotplug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pci_hotplug.h')
-rw-r--r--include/linux/pci_hotplug.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
index 11936fd0b56d..b3646cd7fd5a 100644
--- a/include/linux/pci_hotplug.h
+++ b/include/linux/pci_hotplug.h
@@ -69,6 +69,7 @@ enum pcie_link_speed {
69/** 69/**
70 * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use 70 * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use
71 * @owner: The module owner of this structure 71 * @owner: The module owner of this structure
72 * @mod_name: The module name (KBUILD_MODNAME) of this structure
72 * @enable_slot: Called when the user wants to enable a specific pci slot 73 * @enable_slot: Called when the user wants to enable a specific pci slot
73 * @disable_slot: Called when the user wants to disable a specific pci slot 74 * @disable_slot: Called when the user wants to disable a specific pci slot
74 * @set_attention_status: Called to set the specific slot's attention LED to 75 * @set_attention_status: Called to set the specific slot's attention LED to
@@ -101,6 +102,7 @@ enum pcie_link_speed {
101 */ 102 */
102struct hotplug_slot_ops { 103struct hotplug_slot_ops {
103 struct module *owner; 104 struct module *owner;
105 const char *mod_name;
104 int (*enable_slot) (struct hotplug_slot *slot); 106 int (*enable_slot) (struct hotplug_slot *slot);
105 int (*disable_slot) (struct hotplug_slot *slot); 107 int (*disable_slot) (struct hotplug_slot *slot);
106 int (*set_attention_status) (struct hotplug_slot *slot, u8 value); 108 int (*set_attention_status) (struct hotplug_slot *slot, u8 value);
@@ -159,12 +161,21 @@ static inline const char *hotplug_slot_name(const struct hotplug_slot *slot)
159 return pci_slot_name(slot->pci_slot); 161 return pci_slot_name(slot->pci_slot);
160} 162}
161 163
162extern int pci_hp_register(struct hotplug_slot *, struct pci_bus *, int nr, 164extern int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *pbus,
163 const char *name); 165 int nr, const char *name,
166 struct module *owner, const char *mod_name);
164extern int pci_hp_deregister(struct hotplug_slot *slot); 167extern int pci_hp_deregister(struct hotplug_slot *slot);
165extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, 168extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot,
166 struct hotplug_slot_info *info); 169 struct hotplug_slot_info *info);
167 170
171static inline int pci_hp_register(struct hotplug_slot *slot,
172 struct pci_bus *pbus,
173 int devnr, const char *name)
174{
175 return __pci_hp_register(slot, pbus, devnr, name,
176 THIS_MODULE, KBUILD_MODNAME);
177}
178
168/* PCI Setting Record (Type 0) */ 179/* PCI Setting Record (Type 0) */
169struct hpp_type0 { 180struct hpp_type0 {
170 u32 revision; 181 u32 revision;