summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2014-10-04 19:40:13 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-10-08 08:39:01 +0200
commit48f88df158cc6dab89230cf92faeb9389a75faf1 (patch)
tree5bade4fd46d5689d9a8a1c67ea84901446749ea7 /drivers/pci
parentb8a1bb1dd215770670108fe5b0de0e5e137bf8fd (diff)
downloadbarebox-48f88df158cc6dab89230cf92faeb9389a75faf1.tar.gz
barebox-48f88df158cc6dab89230cf92faeb9389a75faf1.tar.xz
pci: prettyprint device names
Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/bus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 8215ee5638..866ab08067 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -86,7 +86,8 @@ int pci_register_device(struct pci_dev *pdev)
struct device_d *dev = &pdev->dev;
int ret;
- strcpy(dev->name, "pci");
+ snprintf(dev->name, MAX_DRIVER_NAME, "pci-%04x:%04x.",
+ pdev->vendor, pdev->device);
dev->bus = &pci_bus;
dev->id = DEVICE_ID_DYNAMIC;