Skip to content

Commit

Permalink
[PATCH] PCIE: make bus_id for PCI Express devices unique
Browse files Browse the repository at this point in the history
The bus_id string must be unique for all devices of that bus in the
system, not just for devices with the same parent - otherwise multiple
symlinks with identical names appear in /sys/bus/pci_express/devices.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Sergey Vlasov authored and Greg Kroah-Hartman committed Jan 9, 2006
1 parent fb37fb9 commit 8c9ad50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/pcie/portdrv_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ static void pcie_device_init(struct pci_dev *parent, struct pcie_device *dev,
device->driver = NULL;
device->driver_data = NULL;
device->release = release_pcie_device; /* callback to free pcie dev */
sprintf(&device->bus_id[0], "pcie%02x",
get_descriptor_id(port_type, service_type));
snprintf(device->bus_id, sizeof(device->bus_id), "%s:pcie%02x",
pci_name(parent), get_descriptor_id(port_type, service_type));
device->parent = &parent->dev;
}

Expand Down

0 comments on commit 8c9ad50

Please sign in to comment.