aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc64/kernel/pci.c2
-rw-r--r--include/linux/pci.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index 112b09f16f36..d00a3656c287 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -408,7 +408,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
408 dev->class = class >> 8; 408 dev->class = class >> 8;
409 dev->revision = class & 0xff; 409 dev->revision = class & 0xff;
410 410
411 sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), 411 sprintf(dev->dev.bus_id, "%04x:%02x:%02x.%d", pci_domain_nr(bus),
412 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); 412 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
413 413
414 if (ofpci_verbose) 414 if (ofpci_verbose)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 96ebaa8d80e3..4c80dc3f2990 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -996,9 +996,9 @@ static inline void pci_set_drvdata(struct pci_dev *pdev, void *data)
996/* If you want to know what to call your pci_dev, ask this function. 996/* If you want to know what to call your pci_dev, ask this function.
997 * Again, it's a wrapper around the generic device. 997 * Again, it's a wrapper around the generic device.
998 */ 998 */
999static inline char *pci_name(struct pci_dev *pdev) 999static inline const char *pci_name(struct pci_dev *pdev)
1000{ 1000{
1001 return pdev->dev.bus_id; 1001 return dev_name(&pdev->dev);
1002} 1002}
1003 1003
1004 1004