Skip to contentSkip to conversation

radio-sf16fmi cleanup

PATCH In review Marcel Sebek 2 participants 3 messages Dec 19, 2004 – Jan 10, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 radio-sf16fmi cleanup

This is small cleanup of radio-sf16fmi driver.

Compile tested.

drivers/media/radio/radio-sf16fmi.c +4 -13
diff -urNp linux-2.6/drivers/media/radio/radio-sf16fmi.c linux-2.6-new/drivers/media/radio/radio-sf16fmi.c
@@ -22,6 +22,7 @@
 #include <linux/delay.h>	/* udelay			*/
 #include <linux/videodev.h>	/* kernel radio structs		*/
 #include <linux/isapnp.h>
+#include <linux/moduleparam.h>
 #include <asm/io.h>		/* outb, outb_p			*/
 #include <asm/uaccess.h>	/* copy to/from user		*/
 #include <asm/semaphore.h>
@@ -36,7 +37,7 @@ struct fmi_device
 
 static int io = -1; 
 static int radio_nr = -1;
-static struct pnp_dev *dev = NULL;
+static struct pnp_dev *dev;
 static struct semaphore lock;
 
 /* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */
@@ -312,9 +313,9 @@ MODULE_AUTHOR("Petr Vandrovec, vandrove@
 MODULE_DESCRIPTION("A driver for the SF16MI radio.");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0444);
 MODULE_PARM_DESC(io, "I/O address of the SF16MI card (0x284 or 0x384)");
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0444);
 
 static void __exit fmi_cleanup_module(void)
 {
@@ -326,13 +327,3 @@ static void __exit fmi_cleanup_module(vo
 
 module_init(fmi_init);
 module_exit(fmi_cleanup_module);
-
-#ifndef MODULE
-static int __init fmi_setup_io(char *str)
-{
-	get_option(&str, &io);
-	return 1;
-}
-
-__setup("sf16fm=", fmi_setup_io);
-#endif

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 9 lines · Marcel Sebek

This is small cleanup of radio-sf16fmi driver.

Compile tested.

diff -urNp linux-2.6/drivers/media/radio/radio-sf16fmi.c linux-2.6-new/drivers/media/radio/radio-sf16fmi.c

drivers/media/radio/radio-sf16fmi.c +0 -0

...

drivers/media/radio/radio-sf16fmi.c MODULE_AUTHOR("Petr Vandrovec, vandrove@ · line 316

Quoted 2 lines
drivers/media/radio/radio-sf16fmi.c +1 -1
-MODULE_PARM(io, "i");
+module_param(io, int, 0444);

...

module_param from other folks already got merged.

Care to resend this chunk with removal from kernel-parameters.txt?

drivers/media/radio/radio-sf16fmi.c static void __exit fmi_cleanup_module(vo · line 338

Quoted 10 lines
drivers/media/radio/radio-sf16fmi.c +0 -10
-
-#ifndef MODULE
-static int __init fmi_setup_io(char *str)
-{
-	get_option(&str, &io);
-	return 1;
-}
-
-__setup("sf16fm=", fmi_setup_io);
-#endif

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#2 lore raw
In reply to Marcel Sebek
Quoted 12 lines · Domen Puncer

Care to resend this chunk with removal from kernel-parameters.txt?

Review

Quoted 10 lines
(quoted diff) +0 -10
-
-#ifndef MODULE
-static int __init fmi_setup_io(char *str)
-{
-	get_option(&str, &io);
-	return 1;
-}
-
-__setup("sf16fm=", fmi_setup_io);
-#endif
Documentation/kernel-parameters.txt +0 -3
Index: linux-2.6.10-kj/Documentation/kernel-parameters.txt
===================================================================
@@ -1134,9 +1134,6 @@ running once the system is up.
 
 	serialnumber	[BUGS=IA-32]
 
-	sf16fm=		[HW] SF16FMI radio driver for Linux
-			Format: <io>
-
 	sg_def_reserved_size=
 			[SCSI]
  
drivers/media/radio/radio-sf16fmi.c +0 -10
Index: linux-2.6.10-kj/drivers/media/radio/radio-sf16fmi.c
===================================================================
@@ -326,13 +326,3 @@ static void __exit fmi_cleanup_module(vo
 
 module_init(fmi_init);
 module_exit(fmi_cleanup_module);
-
-#ifndef MODULE
-static int __init fmi_setup_io(char *str)
-{
-	get_option(&str, &io);
-	return 1;
-}
-
-__setup("sf16fm=", fmi_setup_io);
-#endif

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors