[PATCH] PCI: drivers/pci: some cleanups
authorAdrian Bunk <bunk@stusta.de>
Thu, 22 Dec 2005 00:08:52 +0000 (01:08 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 9 Jan 2006 20:13:20 +0000 (12:13 -0800)
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>
drivers/pci/hotplug/pciehp_core.c
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/proc.c
drivers/pci/remove.c

index 986e202..4fb5690 100644 (file)
@@ -512,7 +512,7 @@ static void __exit unload_pciehpd(void)
 
 }
 
-int hpdriver_context = 0;
+static int hpdriver_context = 0;
 
 static void pciehp_remove (struct pcie_device *device)
 {
index 81b9b8d..d2a633e 100644 (file)
@@ -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 @@ pci_max_busnr(void)
        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_GPL(pci_restore_bars);
 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);
index 294849d..a6dfee2 100644 (file)
@@ -26,20 +26,15 @@ extern int pci_user_write_config_dword(struct pci_dev *dev, int where, u32 val);
 #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);
index 9eb4657..d21894c 100644 (file)
@@ -431,6 +431,7 @@ int pci_proc_detach_device(struct pci_dev *dev)
        return 0;
 }
 
+#if 0
 int pci_proc_attach_bus(struct pci_bus* bus)
 {
        struct proc_dir_entry *de = bus->procdir;
@@ -447,6 +448,7 @@ int pci_proc_attach_bus(struct pci_bus* bus)
        }
        return 0;
 }
+#endif  /*  0  */
 
 int pci_proc_detach_bus(struct pci_bus* bus)
 {
@@ -612,7 +614,6 @@ __initcall(pci_proc_init);
 
 #ifdef CONFIG_HOTPLUG
 EXPORT_SYMBOL(pci_proc_attach_device);
-EXPORT_SYMBOL(pci_proc_attach_bus);
 EXPORT_SYMBOL(pci_proc_detach_bus);
 #endif
 
index 27a294b..1a6bf9d 100644 (file)
@@ -48,6 +48,7 @@ static void pci_destroy_dev(struct pci_dev *dev)
  * 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 @@ int pci_remove_device_safe(struct pci_dev *dev)
        pci_destroy_dev(dev);
        return 0;
 }
-EXPORT_SYMBOL(pci_remove_device_safe);
+#endif  /*  0  */
 
 void pci_remove_bus(struct pci_bus *pci_bus)
 {