diff options
author | Sergey Vlasov <vsu@altlinux.ru> | 2005-11-14 12:30:50 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-09 15:13:15 -0500 |
commit | 8c9ad508c8737ca46a4c55b1062d159b86f7cee2 (patch) | |
tree | 20e2a5ffb2ec6f6dcf98a65c4d612c2766002fa9 /drivers/pci/pcie | |
parent | fb37fb960689aa1346e2621a946f230285c03593 (diff) |
[PATCH] PCIE: make bus_id for PCI Express devices unique
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>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r-- | drivers/pci/pcie/portdrv_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index 467a4ceccf10..e4e5f1e8d816 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c | |||
@@ -238,8 +238,8 @@ static void pcie_device_init(struct pci_dev *parent, struct pcie_device *dev, | |||
238 | device->driver = NULL; | 238 | device->driver = NULL; |
239 | device->driver_data = NULL; | 239 | device->driver_data = NULL; |
240 | device->release = release_pcie_device; /* callback to free pcie dev */ | 240 | device->release = release_pcie_device; /* callback to free pcie dev */ |
241 | sprintf(&device->bus_id[0], "pcie%02x", | 241 | snprintf(device->bus_id, sizeof(device->bus_id), "%s:pcie%02x", |
242 | get_descriptor_id(port_type, service_type)); | 242 | pci_name(parent), get_descriptor_id(port_type, service_type)); |
243 | device->parent = &parent->dev; | 243 | device->parent = &parent->dev; |
244 | } | 244 | } |
245 | 245 | ||