From 54c762fe62d9ff0982f38e80cbec9c59104311e9 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Thu, 22 Dec 2005 01:08:52 +0100 Subject: [PATCH] [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 Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/pciehp_core.c | 2 +- drivers/pci/pci.c | 5 +++-- drivers/pci/pci.h | 5 ----- drivers/pci/proc.c | 3 ++- drivers/pci/remove.c | 3 ++- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index 986e202e0b..4fb569018a 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c @@ -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) { diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 81b9b8d9bc..d2a633efa1 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -19,6 +19,7 @@ #include /* 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); diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 294849d245..a6dfee2f6d 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -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); diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 9eb465727f..d21894c63f 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c @@ -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 diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index 27a294b696..1a6bf9de16 100644 --- a/drivers/pci/remove.c +++ b/drivers/pci/remove.c @@ -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) { -- 2.39.5