All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: make pci_name use dev_name
@ 2008-07-02 15:35 Greg Kroah-Hartman
  2008-07-02 15:51 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 19+ messages in thread
From: Greg Kroah-Hartman @ 2008-07-02 15:35 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: Kay Sievers, linux-kernel, linux-pci, davem

From: Greg Kroah-Hartman <gregkh@suse.de>

Also fixes up the sparc PCI code that was assuming this is not a
constant.

This is done in anticipation of removing the bus_id field from struct
driver.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/sparc64/kernel/pci.c |    2 +-
 include/linux/pci.h       |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -408,7 +408,7 @@ struct pci_dev *of_create_pci_dev(struct
 	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)
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -977,9 +977,9 @@ static inline void pci_set_drvdata(struc
 /* 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);
 }
 
 

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2008-08-07 12:24 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-02 15:35 [PATCH] PCI: make pci_name use dev_name Greg Kroah-Hartman
2008-07-02 15:51 ` Greg Kroah-Hartman
2008-07-02 15:58   ` Jesse Barnes
2008-07-02 16:04     ` Greg KH
2008-07-02 20:22       ` Greg KH
2008-07-02 20:24         ` [patch 01/04] MTD: handle pci_name() being const Greg Kroah-Hartman
2008-07-02 20:24         ` [patch 02/04] PCI: " Greg Kroah-Hartman
2008-07-03 19:33           ` Jesse Barnes
2008-07-02 20:24         ` [patch 03/04] 3c59x: " Greg Kroah-Hartman
2008-07-02 23:28           ` Andrew Morton
2008-07-03 12:17           ` Steffen Klassert
2008-07-03 15:43             ` Greg KH
2008-08-07  6:31             ` Jeff Garzik
2008-08-07 10:18               ` Steffen Klassert
2008-07-02 20:24         ` [patch 04/04] USB: " Greg Kroah-Hartman
2008-07-03 19:37         ` [PATCH] PCI: make pci_name use dev_name Jesse Barnes
2008-07-03 20:24           ` Greg KH
2008-07-03 20:33             ` Jesse Barnes
2008-07-03 20:52               ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.