patch-2.3.32 linux/drivers/cdrom/isp16.c
Next file: linux/drivers/cdrom/isp16.h
Previous file: linux/drivers/cdrom/gscd.c
Back to the patch index
Back to the overall index
- Lines: 76
- Date:
Mon Dec 13 14:08:40 1999
- Orig file:
v2.3.31/linux/drivers/cdrom/isp16.c
- Orig date:
Tue Jul 6 19:05:48 1999
diff -u --recursive --new-file v2.3.31/linux/drivers/cdrom/isp16.c linux/drivers/cdrom/isp16.c
@@ -11,6 +11,11 @@
* Removed sound configuration.
* Added "module" support.
*
+ * 9 November 1999 -- Make kernel-parameter implementation work with 2.3.x
+ * Removed init_module & cleanup_module in favor of
+ * module_init & module_exit.
+ * Torben Mathiasen <tmm@image.dk>
+ *
* Detect cdrom interface on ISP16 sound card.
* Configure cdrom interface.
*
@@ -69,17 +74,20 @@
MODULE_PARM(isp16_cdrom_irq, "i");
MODULE_PARM(isp16_cdrom_dma, "i");
MODULE_PARM(isp16_cdrom_type, "s");
-int init_module(void);
-void cleanup_module(void);
+void isp16_exit(void);
#endif
#define ISP16_IN(p) (outb(isp16_ctrl,ISP16_CTRL_PORT), inb(p))
#define ISP16_OUT(p,b) (outb(isp16_ctrl,ISP16_CTRL_PORT), outb(b,p))
+#ifndef MODULE
-void __init
-isp16_setup(char *str, int *ints)
+static int
+__init isp16_setup(char *str)
{
+ int ints[4];
+
+ (void)get_options(str, ARRAY_SIZE(ints), ints);
if ( ints[0] > 0 )
isp16_cdrom_base = ints[1];
if ( ints[0] > 1 )
@@ -88,8 +96,14 @@
isp16_cdrom_dma = ints[3];
if ( str )
isp16_cdrom_type = str;
+
+ return 1;
}
+__setup("isp16=", isp16_setup);
+
+#endif /* MODULE */
+
/*
* ISP16 initialisation.
*
@@ -307,15 +321,15 @@
return(0);
}
-#ifdef MODULE
-int init_module(void)
-{
- return isp16_init();
-}
-
-void cleanup_module(void)
+void __exit isp16_exit(void)
{
release_region(ISP16_IO_BASE, ISP16_IO_SIZE);
printk(KERN_INFO "ISP16: module released.\n");
}
-#endif /* MODULE */
+
+#ifdef MODULE
+module_init(isp16_init);
+#endif
+module_exit(isp16_exit);
+
+
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)