Skip to contentSkip to conversation

radio-sf16fmi cleanup

PATCH New [email protected] 1 participant 1 message Dec 25, 2004 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 radio-sf16fmi cleanup

[Sorry about duplicate, had mail problems]

This is small cleanup of radio-sf16fmi driver.

Compile tested.

---

 kj-domen/drivers/media/radio/radio-sf16fmi.c |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)
drivers/media/radio/radio-sf16fmi.c renamed from drivers/media/radio/radio-sf16fmi.c~cleanup-drivers_media_radio_radio-sf16fmi.c +4 -13
diff -puN drivers/media/radio/radio-sf16fmi.c~cleanup-drivers_media_radio_radio-sf16fmi.c 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

_