tree ca41930bb82ce02147f58df7b288fdf8a6b3e9b2
parent 346d38823b59d65c3c1365971776b52e0661b7e5
author Kristen Accardi <[EMAIL PROTECTED]> Sat, 06 Aug 2005 02:16:06 -0700
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Fri, 09 Sep 2005 04:57:24 -0700

[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 <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

 drivers/pci/hotplug/pciehp.h |    2 +-
 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
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -302,7 +302,7 @@ static inline void return_resource(struc
 
 static inline void make_slot_name(char *buffer, int buffer_size, struct slot 
*slot)
 {
-       snprintf(buffer, buffer_size, "%d", slot->number);
+       snprintf(buffer, buffer_size, "%04d_%04d", slot->bus, slot->number);
 }
 
 enum php_ctlr_type {
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h
--- a/drivers/pci/hotplug/shpchp.h
+++ b/drivers/pci/hotplug/shpchp.h
@@ -411,7 +411,7 @@ static inline void return_resource(struc
 
 static inline void make_slot_name(char *buffer, int buffer_size, struct slot 
*slot)
 {
-       snprintf(buffer, buffer_size, "%d", slot->number);
+       snprintf(buffer, buffer_size, "%04d_%04d", slot->bus, slot->number);
 }
 
 enum php_ctlr_type {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to