Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Kristen Accardi and committed by
Greg Kroah-Hartman
1248d636 346d3882

+2 -2
+1 -1
drivers/pci/hotplug/pciehp.h
··· 302 302 303 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 308 enum php_ctlr_type {
+1 -1
drivers/pci/hotplug/shpchp.h
··· 411 411 412 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 417 enum php_ctlr_type {