ChangeSet 1.1285.1.6, 2003/08/21 10:07:11-07:00, greg@kroah.com

PCI: added the pci_pretty_name() macro to pci.h as 2 arches already had it.


 arch/alpha/kernel/sys_marvel.c |    7 -------
 arch/x86_64/kernel/pci-gart.c  |    6 ------
 include/linux/pci.h            |    7 +++++++
 3 files changed, 7 insertions(+), 13 deletions(-)


diff -Nru a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c
--- a/arch/alpha/kernel/sys_marvel.c	Thu Aug 21 10:20:18 2003
+++ b/arch/alpha/kernel/sys_marvel.c	Thu Aug 21 10:20:18 2003
@@ -33,13 +33,6 @@
 # error NR_IRQS < MARVEL_NR_IRQS !!!
 #endif
 
-/* ??? Should probably be generic.  */
-#ifdef CONFIG_PCI_NAMES
-#define pci_pretty_name(x) ((x)->pretty_name)
-#else
-#define pci_pretty_name(x) ""
-#endif
-
 
 /*
  * Interrupt handling.
diff -Nru a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
--- a/arch/x86_64/kernel/pci-gart.c	Thu Aug 21 10:20:18 2003
+++ b/arch/x86_64/kernel/pci-gart.c	Thu Aug 21 10:20:18 2003
@@ -31,12 +31,6 @@
 #include <asm/kdebug.h>
 #include <asm/proto.h>
 
-#ifdef CONFIG_PCI_NAMES
-#define pci_pretty_name(dev) ((dev)->pretty_name)
-#else
-#define pci_pretty_name(dev) ""
-#endif
-
 dma_addr_t bad_dma_address;
 
 unsigned long iommu_bus_base;	/* GART remapping area (physical) */
diff -Nru a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h	Thu Aug 21 10:20:18 2003
+++ b/include/linux/pci.h	Thu Aug 21 10:20:18 2003
@@ -842,6 +842,13 @@
 	return pdev->dev.bus_id;
 }
 
+/* Some archs want to see the pretty pci name, so use this macro */
+#ifdef CONFIG_PCI_NAMES
+#define pci_pretty_name(dev) ((dev)->pretty_name)
+#else
+#define pci_pretty_name(dev) ""
+#endif
+
 /*
  *  The world is not perfect and supplies us with broken PCI devices.
  *  For at least a part of these bugs we need a work-around, so both
