public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] i386 scx200.c: misc cleanups
@ 2005-01-16  8:15 Adrian Bunk
  0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2005-01-16  8:15 UTC (permalink / raw)
  To: Christer Weinigel; +Cc: linux-kernel

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


diffstat output:
 arch/i386/kernel/scx200.c   |    9 ++++-----
 include/linux/scx200_gpio.h |    2 --
 2 files changed, 4 insertions(+), 7 deletions(-)


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.11-rc1-mm1-full/include/linux/scx200_gpio.h.old	2005-01-16 04:45:06.000000000 +0100
+++ linux-2.6.11-rc1-mm1-full/include/linux/scx200_gpio.h	2005-01-16 04:45:20.000000000 +0100
@@ -1,10 +1,8 @@
 #include <linux/spinlock.h>
 
 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)
--- linux-2.6.11-rc1-mm1-full/arch/i386/kernel/scx200.c.old	2005-01-16 04:44:09.000000000 +0100
+++ linux-2.6.11-rc1-mm1-full/arch/i386/kernel/scx200.c	2005-01-16 04:45:28.000000000 +0100
@@ -37,7 +37,6 @@
 	.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)
@@ -81,6 +80,7 @@
 	return config;
 }
 
+#if 0
 void scx200_gpio_dump(unsigned index)
 {
 	u32 config = scx200_gpio_configure(index, ~0, 0);
@@ -112,15 +112,16 @@
 		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);
@@ -131,9 +132,7 @@
 
 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);
 
 /*
     Local variables:


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [2.6 patch] i386 scx200.c: misc cleanups
@ 2005-02-24 23:37 Adrian Bunk
  2005-02-25 14:19 ` Henrik Brix Andersen
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2005-02-24 23:37 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Christer Weinigel, linux-kernel

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 <bunk@stusta.de>

---

This patch was already sent on:
- 16 Jan 2005

 arch/i386/kernel/scx200.c   |    9 ++++-----
 include/linux/scx200_gpio.h |    2 --
 2 files changed, 4 insertions(+), 7 deletions(-)

--- linux-2.6.11-rc1-mm1-full/include/linux/scx200_gpio.h.old	2005-01-16 04:45:06.000000000 +0100
+++ linux-2.6.11-rc1-mm1-full/include/linux/scx200_gpio.h	2005-01-16 04:45:20.000000000 +0100
@@ -1,10 +1,8 @@
 #include <linux/spinlock.h>
 
 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)
--- linux-2.6.11-rc1-mm1-full/arch/i386/kernel/scx200.c.old	2005-01-16 04:44:09.000000000 +0100
+++ linux-2.6.11-rc1-mm1-full/arch/i386/kernel/scx200.c	2005-01-16 04:45:28.000000000 +0100
@@ -37,7 +37,6 @@
 	.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)
@@ -81,6 +80,7 @@
 	return config;
 }
 
+#if 0
 void scx200_gpio_dump(unsigned index)
 {
 	u32 config = scx200_gpio_configure(index, ~0, 0);
@@ -112,15 +112,16 @@
 		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);
@@ -131,9 +132,7 @@
 
 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);
 
 /*
     Local variables:


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [2.6 patch] i386 scx200.c: misc cleanups
  2005-02-24 23:37 [2.6 patch] i386 scx200.c: misc cleanups Adrian Bunk
@ 2005-02-25 14:19 ` Henrik Brix Andersen
  0 siblings, 0 replies; 3+ messages in thread
From: Henrik Brix Andersen @ 2005-02-25 14:19 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Andrew Morton, Christer Weinigel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]

On Fri, 2005-02-25 at 00:37 +0100, Adrian Bunk wrote:
> 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 <bunk@stusta.de>

I second those changes.

Signed-off-by: Henrik Brix Andersen <brix@gentoo.org>

./Brix
-- 
Henrik Brix Andersen <brix@gentoo.org>
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-25 14:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-24 23:37 [2.6 patch] i386 scx200.c: misc cleanups Adrian Bunk
2005-02-25 14:19 ` Henrik Brix Andersen
  -- strict thread matches above, loose matches on Subject: below --
2005-01-16  8:15 Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox