From: Adrian Bunk The patch below contains the following cleanups: - make some needlessly global code static - #if 0 the following unused global functions: - scx200_gpio_dump - remove the following unneeded EXPORT_SYMBOL's: - scx200_gpio_lock - scx200_gpio_dump Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton --- 25-akpm/arch/i386/kernel/scx200.c | 9 ++++----- 25-akpm/include/linux/scx200_gpio.h | 2 -- 2 files changed, 4 insertions(+), 7 deletions(-) diff -puN arch/i386/kernel/scx200.c~i386-scx200c-misc-cleanups arch/i386/kernel/scx200.c --- 25/arch/i386/kernel/scx200.c~i386-scx200c-misc-cleanups 2005-02-24 21:22:41.000000000 -0800 +++ 25-akpm/arch/i386/kernel/scx200.c 2005-02-24 21:22:41.000000000 -0800 @@ -44,7 +44,6 @@ static struct pci_driver scx200_pci_driv .probe = scx200_probe, }; -DEFINE_SPINLOCK(scx200_gpio_lock); static DEFINE_SPINLOCK(scx200_gpio_config_lock); static int __devinit scx200_probe(struct pci_dev *pdev, const struct pci_device_id *ent) @@ -105,6 +104,7 @@ u32 scx200_gpio_configure(int index, u32 return config; } +#if 0 void scx200_gpio_dump(unsigned index) { u32 config = scx200_gpio_configure(index, ~0, 0); @@ -136,15 +136,16 @@ void scx200_gpio_dump(unsigned index) printk(" DEBOUNCE"); /* debounce */ printk("\n"); } +#endif /* 0 */ -int __init scx200_init(void) +static int __init scx200_init(void) { printk(KERN_INFO NAME ": NatSemi SCx200 Driver\n"); return pci_module_init(&scx200_pci_driver); } -void __exit scx200_cleanup(void) +static void __exit scx200_cleanup(void) { pci_unregister_driver(&scx200_pci_driver); release_region(scx200_gpio_base, SCx200_GPIO_SIZE); @@ -155,9 +156,7 @@ module_exit(scx200_cleanup); EXPORT_SYMBOL(scx200_gpio_base); EXPORT_SYMBOL(scx200_gpio_shadow); -EXPORT_SYMBOL(scx200_gpio_lock); EXPORT_SYMBOL(scx200_gpio_configure); -EXPORT_SYMBOL(scx200_gpio_dump); EXPORT_SYMBOL(scx200_cb_base); /* diff -puN include/linux/scx200_gpio.h~i386-scx200c-misc-cleanups include/linux/scx200_gpio.h --- 25/include/linux/scx200_gpio.h~i386-scx200c-misc-cleanups 2005-02-24 21:22:41.000000000 -0800 +++ 25-akpm/include/linux/scx200_gpio.h 2005-02-24 21:22:41.000000000 -0800 @@ -1,10 +1,8 @@ #include u32 scx200_gpio_configure(int index, u32 set, u32 clear); -void scx200_gpio_dump(unsigned index); extern unsigned scx200_gpio_base; -extern spinlock_t scx200_gpio_lock; extern long scx200_gpio_shadow[2]; #define scx200_gpio_present() (scx200_gpio_base!=0) _