diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-12-21 19:08:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-09 15:13:20 -0500 |
commit | 54c762fe62d9ff0982f38e80cbec9c59104311e9 (patch) | |
tree | 524fa5aa095973b8496537d39c70aa8c0d47b243 /drivers/pci | |
parent | c64b5eead93f9d3a8ca0e9ca0ffba0b99dc565b9 (diff) |
[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>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/pciehp_core.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci.c | 5 | ||||
-rw-r--r-- | drivers/pci/pci.h | 5 | ||||
-rw-r--r-- | drivers/pci/proc.c | 3 | ||||
-rw-r--r-- | 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 986e202e0b0b..4fb569018a24 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) | |||
512 | 512 | ||
513 | } | 513 | } |
514 | 514 | ||
515 | int hpdriver_context = 0; | 515 | static int hpdriver_context = 0; |
516 | 516 | ||
517 | static void pciehp_remove (struct pcie_device *device) | 517 | static void pciehp_remove (struct pcie_device *device) |
518 | { | 518 | { |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 81b9b8d9bceb..d2a633efa10a 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/dma.h> /* isa_dma_bridge_buggy */ | 19 | #include <asm/dma.h> /* isa_dma_bridge_buggy */ |
20 | #include "pci.h" | 20 | #include "pci.h" |
21 | 21 | ||
22 | #if 0 | ||
22 | 23 | ||
23 | /** | 24 | /** |
24 | * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children | 25 | * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children |
@@ -63,6 +64,8 @@ pci_max_busnr(void) | |||
63 | return max; | 64 | return max; |
64 | } | 65 | } |
65 | 66 | ||
67 | #endif /* 0 */ | ||
68 | |||
66 | static int __pci_find_next_cap(struct pci_bus *bus, unsigned int devfn, u8 pos, int cap) | 69 | static int __pci_find_next_cap(struct pci_bus *bus, unsigned int devfn, u8 pos, int cap) |
67 | { | 70 | { |
68 | u8 id; | 71 | u8 id; |
@@ -917,8 +920,6 @@ EXPORT_SYMBOL_GPL(pci_restore_bars); | |||
917 | EXPORT_SYMBOL(pci_enable_device_bars); | 920 | EXPORT_SYMBOL(pci_enable_device_bars); |
918 | EXPORT_SYMBOL(pci_enable_device); | 921 | EXPORT_SYMBOL(pci_enable_device); |
919 | EXPORT_SYMBOL(pci_disable_device); | 922 | EXPORT_SYMBOL(pci_disable_device); |
920 | EXPORT_SYMBOL(pci_max_busnr); | ||
921 | EXPORT_SYMBOL(pci_bus_max_busnr); | ||
922 | EXPORT_SYMBOL(pci_find_capability); | 923 | EXPORT_SYMBOL(pci_find_capability); |
923 | EXPORT_SYMBOL(pci_bus_find_capability); | 924 | EXPORT_SYMBOL(pci_bus_find_capability); |
924 | EXPORT_SYMBOL(pci_release_regions); | 925 | EXPORT_SYMBOL(pci_release_regions); |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 294849d24590..a6dfee2f6d2b 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); | |||
26 | #ifdef CONFIG_PROC_FS | 26 | #ifdef CONFIG_PROC_FS |
27 | extern int pci_proc_attach_device(struct pci_dev *dev); | 27 | extern int pci_proc_attach_device(struct pci_dev *dev); |
28 | extern int pci_proc_detach_device(struct pci_dev *dev); | 28 | extern int pci_proc_detach_device(struct pci_dev *dev); |
29 | extern int pci_proc_attach_bus(struct pci_bus *bus); | ||
30 | extern int pci_proc_detach_bus(struct pci_bus *bus); | 29 | extern int pci_proc_detach_bus(struct pci_bus *bus); |
31 | #else | 30 | #else |
32 | static inline int pci_proc_attach_device(struct pci_dev *dev) { return 0; } | 31 | static inline int pci_proc_attach_device(struct pci_dev *dev) { return 0; } |
33 | static inline int pci_proc_detach_device(struct pci_dev *dev) { return 0; } | 32 | static inline int pci_proc_detach_device(struct pci_dev *dev) { return 0; } |
34 | static inline int pci_proc_attach_bus(struct pci_bus *bus) { return 0; } | ||
35 | static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; } | 33 | static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; } |
36 | #endif | 34 | #endif |
37 | 35 | ||
38 | /* Functions for PCI Hotplug drivers to use */ | 36 | /* Functions for PCI Hotplug drivers to use */ |
39 | extern unsigned int pci_do_scan_bus(struct pci_bus *bus); | 37 | extern unsigned int pci_do_scan_bus(struct pci_bus *bus); |
40 | extern int pci_remove_device_safe(struct pci_dev *dev); | ||
41 | extern unsigned char pci_max_busnr(void); | ||
42 | extern unsigned char pci_bus_max_busnr(struct pci_bus *bus); | ||
43 | extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); | 38 | extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); |
44 | 39 | ||
45 | extern void pci_remove_legacy_files(struct pci_bus *bus); | 40 | extern void pci_remove_legacy_files(struct pci_bus *bus); |
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 9eb465727fce..d21894c63f8e 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c | |||
@@ -431,6 +431,7 @@ int pci_proc_detach_device(struct pci_dev *dev) | |||
431 | return 0; | 431 | return 0; |
432 | } | 432 | } |
433 | 433 | ||
434 | #if 0 | ||
434 | int pci_proc_attach_bus(struct pci_bus* bus) | 435 | int pci_proc_attach_bus(struct pci_bus* bus) |
435 | { | 436 | { |
436 | struct proc_dir_entry *de = bus->procdir; | 437 | struct proc_dir_entry *de = bus->procdir; |
@@ -447,6 +448,7 @@ int pci_proc_attach_bus(struct pci_bus* bus) | |||
447 | } | 448 | } |
448 | return 0; | 449 | return 0; |
449 | } | 450 | } |
451 | #endif /* 0 */ | ||
450 | 452 | ||
451 | int pci_proc_detach_bus(struct pci_bus* bus) | 453 | int pci_proc_detach_bus(struct pci_bus* bus) |
452 | { | 454 | { |
@@ -612,7 +614,6 @@ __initcall(pci_proc_init); | |||
612 | 614 | ||
613 | #ifdef CONFIG_HOTPLUG | 615 | #ifdef CONFIG_HOTPLUG |
614 | EXPORT_SYMBOL(pci_proc_attach_device); | 616 | EXPORT_SYMBOL(pci_proc_attach_device); |
615 | EXPORT_SYMBOL(pci_proc_attach_bus); | ||
616 | EXPORT_SYMBOL(pci_proc_detach_bus); | 617 | EXPORT_SYMBOL(pci_proc_detach_bus); |
617 | #endif | 618 | #endif |
618 | 619 | ||
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index 27a294b6965d..1a6bf9de166f 100644 --- a/drivers/pci/remove.c +++ b/drivers/pci/remove.c | |||
@@ -48,6 +48,7 @@ static void pci_destroy_dev(struct pci_dev *dev) | |||
48 | * in question is not being used by a driver. | 48 | * in question is not being used by a driver. |
49 | * Returns 0 on success. | 49 | * Returns 0 on success. |
50 | */ | 50 | */ |
51 | #if 0 | ||
51 | int pci_remove_device_safe(struct pci_dev *dev) | 52 | int pci_remove_device_safe(struct pci_dev *dev) |
52 | { | 53 | { |
53 | if (pci_dev_driver(dev)) | 54 | if (pci_dev_driver(dev)) |
@@ -55,7 +56,7 @@ int pci_remove_device_safe(struct pci_dev *dev) | |||
55 | pci_destroy_dev(dev); | 56 | pci_destroy_dev(dev); |
56 | return 0; | 57 | return 0; |
57 | } | 58 | } |
58 | EXPORT_SYMBOL(pci_remove_device_safe); | 59 | #endif /* 0 */ |
59 | 60 | ||
60 | void pci_remove_bus(struct pci_bus *pci_bus) | 61 | void pci_remove_bus(struct pci_bus *pci_bus) |
61 | { | 62 | { |