linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] drivers/cdrom/isp16.c: small cleanups
@ 2005-01-29 17:11 Adrian Bunk
  2005-01-29 17:51 ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2005-01-29 17:11 UTC (permalink / raw)
  To: H.T.M.v.d.Maarel; +Cc: linux-kernel

This patch makes the needlessly global function isp16_init static.

As a result, it turned out that both this function and some other code 
are only required #ifdef MODULE.

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

---

 drivers/cdrom/isp16.c |   13 ++++++++-----
 drivers/cdrom/isp16.h |    1 -
 2 files changed, 8 insertions(+), 6 deletions(-)

--- linux-2.6.11-rc2-mm1-full/drivers/cdrom/isp16.h.old	2005-01-29 16:46:18.000000000 +0100
+++ linux-2.6.11-rc2-mm1-full/drivers/cdrom/isp16.h	2005-01-29 16:47:11.000000000 +0100
@@ -71,4 +71,3 @@
 #define ISP16_IO_BASE 0xF8D
 #define ISP16_IO_SIZE 5  /* ports used from 0xF8D up to 0xF91 */
 
-int isp16_init(void);
--- linux-2.6.11-rc2-mm1-full/drivers/cdrom/isp16.c.old	2005-01-29 16:47:19.000000000 +0100
+++ linux-2.6.11-rc2-mm1-full/drivers/cdrom/isp16.c	2005-01-29 17:46:38.000000000 +0100
@@ -58,6 +58,7 @@
 #include <asm/io.h>
 #include "isp16.h"
 
+#ifdef MODULE
 static short isp16_detect(void);
 static short isp16_c928__detect(void);
 static short isp16_c929__detect(void);
@@ -66,6 +67,7 @@
 static short isp16_type;	/* dependent on type of interface card */
 static u_char isp16_ctrl;
 static u_short isp16_enable_port;
+#endif  /*  MODULE  */
 
 static int isp16_cdrom_base = ISP16_CDROM_IO_BASE;
 static int isp16_cdrom_irq = ISP16_CDROM_IRQ;
@@ -106,13 +108,13 @@
 
 __setup("isp16=", isp16_setup);
 
-#endif				/* MODULE */
+#else				/* MODULE */
 
 /*
  *  ISP16 initialisation.
  *
  */
-int __init isp16_init(void)
+static int __init isp16_init(void)
 {
 	u_char expected_drive;
 
@@ -366,15 +368,16 @@
 	return 0;
 }
 
+module_init(isp16_init);
+
+#endif
+
 void __exit isp16_exit(void)
 {
 	release_region(ISP16_IO_BASE, ISP16_IO_SIZE);
 	printk(KERN_INFO "ISP16: module released.\n");
 }
 
-#ifdef MODULE
-module_init(isp16_init);
-#endif
 module_exit(isp16_exit);
 
 MODULE_LICENSE("GPL");


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

end of thread, other threads:[~2005-01-30  9:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-29 17:11 [2.6 patch] drivers/cdrom/isp16.c: small cleanups Adrian Bunk
2005-01-29 17:51 ` Bartlomiej Zolnierkiewicz
2005-01-29 23:46   ` Adrian Bunk
2005-01-29 23:54     ` Bartlomiej Zolnierkiewicz
2005-01-30  9:02       ` [FIX] " Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).