Commit c6c4f070 authored by Greg KH's avatar Greg KH Committed by Jesse Barnes

PCI: make pci_name use dev_name

Also fixes up the sparc code that was assuming this is not a constant.
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent eebfcfb5
...@@ -408,7 +408,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, ...@@ -408,7 +408,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
dev->class = class >> 8; dev->class = class >> 8;
dev->revision = class & 0xff; dev->revision = class & 0xff;
sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), sprintf(dev->dev.bus_id, "%04x:%02x:%02x.%d", pci_domain_nr(bus),
dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
if (ofpci_verbose) if (ofpci_verbose)
......
...@@ -996,9 +996,9 @@ static inline void pci_set_drvdata(struct pci_dev *pdev, void *data) ...@@ -996,9 +996,9 @@ static inline void pci_set_drvdata(struct pci_dev *pdev, void *data)
/* If you want to know what to call your pci_dev, ask this function. /* If you want to know what to call your pci_dev, ask this function.
* Again, it's a wrapper around the generic device. * Again, it's a wrapper around the generic device.
*/ */
static inline char *pci_name(struct pci_dev *pdev) static inline const char *pci_name(struct pci_dev *pdev)
{ {
return pdev->dev.bus_id; return dev_name(&pdev->dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment