[PATCH] PCI: drivers/pci: some cleanups

This patch contains the following cleanups:
- hotplug/pciehp_core.c: make the needlessly global hpdriver_context
                         static
- #if 0 the following unused functions:
  - pci.c: pci_bus_max_busnr()
  - pci.c: pci_max_busnr()
  - proc.c: pci_proc_attach_bus()
  - remove.c: pci_remove_device_safe

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index 986e202..4fb5690 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -512,7 +512,7 @@
 
 }
 
-int hpdriver_context = 0;
+static int hpdriver_context = 0;
 
 static void pciehp_remove (struct pcie_device *device)
 {
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 81b9b8d..d2a633e 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -19,6 +19,7 @@
 #include <asm/dma.h>	/* isa_dma_bridge_buggy */
 #include "pci.h"
 
+#if 0
 
 /**
  * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children
@@ -63,6 +64,8 @@
 	return max;
 }
 
+#endif  /*  0  */
+
 static int __pci_find_next_cap(struct pci_bus *bus, unsigned int devfn, u8 pos, int cap)
 {
 	u8 id;
@@ -917,8 +920,6 @@
 EXPORT_SYMBOL(pci_enable_device_bars);
 EXPORT_SYMBOL(pci_enable_device);
 EXPORT_SYMBOL(pci_disable_device);
-EXPORT_SYMBOL(pci_max_busnr);
-EXPORT_SYMBOL(pci_bus_max_busnr);
 EXPORT_SYMBOL(pci_find_capability);
 EXPORT_SYMBOL(pci_bus_find_capability);
 EXPORT_SYMBOL(pci_release_regions);
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 294849d..a6dfee2 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -26,20 +26,15 @@
 #ifdef CONFIG_PROC_FS
 extern int pci_proc_attach_device(struct pci_dev *dev);
 extern int pci_proc_detach_device(struct pci_dev *dev);
-extern int pci_proc_attach_bus(struct pci_bus *bus);
 extern int pci_proc_detach_bus(struct pci_bus *bus);
 #else
 static inline int pci_proc_attach_device(struct pci_dev *dev) { return 0; }
 static inline int pci_proc_detach_device(struct pci_dev *dev) { return 0; }
-static inline int pci_proc_attach_bus(struct pci_bus *bus) { return 0; }
 static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; }
 #endif
 
 /* Functions for PCI Hotplug drivers to use */
 extern unsigned int pci_do_scan_bus(struct pci_bus *bus);
-extern int pci_remove_device_safe(struct pci_dev *dev);
-extern unsigned char pci_max_busnr(void);
-extern unsigned char pci_bus_max_busnr(struct pci_bus *bus);
 extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap);
 
 extern void pci_remove_legacy_files(struct pci_bus *bus);
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 9eb4657..d21894c 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -431,6 +431,7 @@
 	return 0;
 }
 
+#if 0
 int pci_proc_attach_bus(struct pci_bus* bus)
 {
 	struct proc_dir_entry *de = bus->procdir;
@@ -447,6 +448,7 @@
 	}
 	return 0;
 }
+#endif  /*  0  */
 
 int pci_proc_detach_bus(struct pci_bus* bus)
 {
@@ -612,7 +614,6 @@
 
 #ifdef CONFIG_HOTPLUG
 EXPORT_SYMBOL(pci_proc_attach_device);
-EXPORT_SYMBOL(pci_proc_attach_bus);
 EXPORT_SYMBOL(pci_proc_detach_bus);
 #endif
 
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
index 27a294b..1a6bf9d 100644
--- a/drivers/pci/remove.c
+++ b/drivers/pci/remove.c
@@ -48,6 +48,7 @@
  * in question is not being used by a driver.
  * Returns 0 on success.
  */
+#if 0
 int pci_remove_device_safe(struct pci_dev *dev)
 {
 	if (pci_dev_driver(dev))
@@ -55,7 +56,7 @@
 	pci_destroy_dev(dev);
 	return 0;
 }
-EXPORT_SYMBOL(pci_remove_device_safe);
+#endif  /*  0  */
 
 void pci_remove_bus(struct pci_bus *pci_bus)
 {