]> err.no Git - linux-2.6/commitdiff
PCI: make pci_name use dev_name
authorGreg KH <gregkh@suse.de>
Thu, 3 Jul 2008 16:49:39 +0000 (09:49 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 7 Jul 2008 23:02:40 +0000 (16:02 -0700)
Also fixes up the sparc code that was assuming this is not a constant.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
arch/sparc64/kernel/pci.c
include/linux/pci.h

index 112b09f16f367ffe788e2623a91debb118454c16..d00a3656c287fed07c13b4609997e1ff09f8e375 100644 (file)
@@ -408,7 +408,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
        dev->class = class >> 8;
        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));
 
        if (ofpci_verbose)
index 96ebaa8d80e3a6733781caf33e2e086e3672a2e8..4c80dc3f2990910622399a10127753dc4f6826e1 100644 (file)
@@ -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.
  * 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);
 }