Skip to content

Commit

Permalink
[PATCH] PCI Hotplug: use bus_slot number for name
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kristen Accardi authored and Greg Kroah-Hartman committed Sep 8, 2005
1 parent 346d388 commit 1248d63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/pci/hotplug/pciehp.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ static inline void return_resource(struct pci_resource **head, struct pci_resour

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 {
Expand Down
2 changes: 1 addition & 1 deletion drivers/pci/hotplug/shpchp.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ static inline void return_resource(struct pci_resource **head, struct pci_resour

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 {
Expand Down

0 comments on commit 1248d63

Please sign in to comment.