[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>
	
	
This commit is contained in:
		
					parent
					
						
							
								c64b5eead9
							
						
					
				
			
			
				commit
				
					
						54c762fe62
					
				
			
		
					 5 changed files with 8 additions and 10 deletions
				
			
		|  | @ -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) | static void pciehp_remove (struct pcie_device *device) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -19,6 +19,7 @@ | ||||||
| #include <asm/dma.h>	/* isa_dma_bridge_buggy */ | #include <asm/dma.h>	/* isa_dma_bridge_buggy */ | ||||||
| #include "pci.h" | #include "pci.h" | ||||||
| 
 | 
 | ||||||
|  | #if 0 | ||||||
| 
 | 
 | ||||||
| /**
 | /**
 | ||||||
|  * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children |  * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children | ||||||
|  | @ -63,6 +64,8 @@ pci_max_busnr(void) | ||||||
| 	return max; | 	return max; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | #endif  /*  0  */ | ||||||
|  | 
 | ||||||
| static int __pci_find_next_cap(struct pci_bus *bus, unsigned int devfn, u8 pos, int cap) | static int __pci_find_next_cap(struct pci_bus *bus, unsigned int devfn, u8 pos, int cap) | ||||||
| { | { | ||||||
| 	u8 id; | 	u8 id; | ||||||
|  | @ -917,8 +920,6 @@ EXPORT_SYMBOL_GPL(pci_restore_bars); | ||||||
| EXPORT_SYMBOL(pci_enable_device_bars); | EXPORT_SYMBOL(pci_enable_device_bars); | ||||||
| EXPORT_SYMBOL(pci_enable_device); | EXPORT_SYMBOL(pci_enable_device); | ||||||
| EXPORT_SYMBOL(pci_disable_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_find_capability); | ||||||
| EXPORT_SYMBOL(pci_bus_find_capability); | EXPORT_SYMBOL(pci_bus_find_capability); | ||||||
| EXPORT_SYMBOL(pci_release_regions); | EXPORT_SYMBOL(pci_release_regions); | ||||||
|  |  | ||||||
|  | @ -26,20 +26,15 @@ extern int pci_user_write_config_dword(struct pci_dev *dev, int where, u32 val); | ||||||
| #ifdef CONFIG_PROC_FS | #ifdef CONFIG_PROC_FS | ||||||
| extern int pci_proc_attach_device(struct pci_dev *dev); | extern int pci_proc_attach_device(struct pci_dev *dev); | ||||||
| extern int pci_proc_detach_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); | extern int pci_proc_detach_bus(struct pci_bus *bus); | ||||||
| #else | #else | ||||||
| static inline int pci_proc_attach_device(struct pci_dev *dev) { return 0; } | 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_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; } | static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; } | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| /* Functions for PCI Hotplug drivers to use */ | /* Functions for PCI Hotplug drivers to use */ | ||||||
| extern unsigned int pci_do_scan_bus(struct pci_bus *bus); | 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 int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); | ||||||
| 
 | 
 | ||||||
| extern void pci_remove_legacy_files(struct pci_bus *bus); | extern void pci_remove_legacy_files(struct pci_bus *bus); | ||||||
|  |  | ||||||
|  | @ -431,6 +431,7 @@ int pci_proc_detach_device(struct pci_dev *dev) | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | #if 0 | ||||||
| int pci_proc_attach_bus(struct pci_bus* bus) | int pci_proc_attach_bus(struct pci_bus* bus) | ||||||
| { | { | ||||||
| 	struct proc_dir_entry *de = bus->procdir; | 	struct proc_dir_entry *de = bus->procdir; | ||||||
|  | @ -447,6 +448,7 @@ int pci_proc_attach_bus(struct pci_bus* bus) | ||||||
| 	} | 	} | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
|  | #endif  /*  0  */ | ||||||
| 
 | 
 | ||||||
| int pci_proc_detach_bus(struct pci_bus* bus) | int pci_proc_detach_bus(struct pci_bus* bus) | ||||||
| { | { | ||||||
|  | @ -612,7 +614,6 @@ __initcall(pci_proc_init); | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_HOTPLUG | #ifdef CONFIG_HOTPLUG | ||||||
| EXPORT_SYMBOL(pci_proc_attach_device); | EXPORT_SYMBOL(pci_proc_attach_device); | ||||||
| EXPORT_SYMBOL(pci_proc_attach_bus); |  | ||||||
| EXPORT_SYMBOL(pci_proc_detach_bus); | EXPORT_SYMBOL(pci_proc_detach_bus); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -48,6 +48,7 @@ static void pci_destroy_dev(struct pci_dev *dev) | ||||||
|  * in question is not being used by a driver. |  * in question is not being used by a driver. | ||||||
|  * Returns 0 on success. |  * Returns 0 on success. | ||||||
|  */ |  */ | ||||||
|  | #if 0 | ||||||
| int pci_remove_device_safe(struct pci_dev *dev) | int pci_remove_device_safe(struct pci_dev *dev) | ||||||
| { | { | ||||||
| 	if (pci_dev_driver(dev)) | 	if (pci_dev_driver(dev)) | ||||||
|  | @ -55,7 +56,7 @@ int pci_remove_device_safe(struct pci_dev *dev) | ||||||
| 	pci_destroy_dev(dev); | 	pci_destroy_dev(dev); | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
| EXPORT_SYMBOL(pci_remove_device_safe); | #endif  /*  0  */ | ||||||
| 
 | 
 | ||||||
| void pci_remove_bus(struct pci_bus *pci_bus) | void pci_remove_bus(struct pci_bus *pci_bus) | ||||||
| { | { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Adrian Bunk
				Adrian Bunk