diff options
author | Kristen Accardi <kristen.c.accardi@intel.com> | 2005-08-05 15:16:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-08 17:57:24 -0400 |
commit | 1248d636122e4ec9d7802b850904e3bb48a0da23 (patch) | |
tree | ca41930bb82ce02147f58df7b288fdf8a6b3e9b2 /drivers/pci | |
parent | 346d38823b59d65c3c1365971776b52e0661b7e5 (diff) |
[PATCH] PCI Hotplug: use bus_slot number for name
For systems with multiple hotplug controllers, you need to use more than
just the slot number to uniquely name the slot. Without a unique slot
name, the pci_hp_register() will fail. This patch adds the bus number
to the name.
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/pciehp.h | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 2b92b9e8c910..061ead21ef14 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -302,7 +302,7 @@ static inline void return_resource(struct pci_resource **head, struct pci_resour | |||
302 | 302 | ||
303 | static inline void make_slot_name(char *buffer, int buffer_size, struct slot *slot) | 303 | static inline void make_slot_name(char *buffer, int buffer_size, struct slot *slot) |
304 | { | 304 | { |
305 | snprintf(buffer, buffer_size, "%d", slot->number); | 305 | snprintf(buffer, buffer_size, "%04d_%04d", slot->bus, slot->number); |
306 | } | 306 | } |
307 | 307 | ||
308 | enum php_ctlr_type { | 308 | enum php_ctlr_type { |
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index fe4d653da188..b7d1c61d6bbb 100644 --- a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h | |||
@@ -411,7 +411,7 @@ static inline void return_resource(struct pci_resource **head, struct pci_resour | |||
411 | 411 | ||
412 | static inline void make_slot_name(char *buffer, int buffer_size, struct slot *slot) | 412 | static inline void make_slot_name(char *buffer, int buffer_size, struct slot *slot) |
413 | { | 413 | { |
414 | snprintf(buffer, buffer_size, "%d", slot->number); | 414 | snprintf(buffer, buffer_size, "%04d_%04d", slot->bus, slot->number); |
415 | } | 415 | } |
416 | 416 | ||
417 | enum php_ctlr_type { | 417 | enum php_ctlr_type { |