summaryrefslogtreecommitdiffstats
path: root/drivers/cdrom/mcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cdrom/mcd.c')
-rw-r--r--drivers/cdrom/mcd.c41
1 files changed, 29 insertions, 12 deletions
diff --git a/drivers/cdrom/mcd.c b/drivers/cdrom/mcd.c
index 81f9bd762..cbb2a27cd 100644
--- a/drivers/cdrom/mcd.c
+++ b/drivers/cdrom/mcd.c
@@ -68,6 +68,13 @@
November 1997 -- ported to the Uniform CD-ROM driver by Erik Andersen.
March 1999 -- made io base and irq CONFIG_ options (Tigran Aivazian).
+
+ 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>
+
+
*/
#include <linux/module.h>
@@ -229,9 +236,13 @@ static struct cdrom_device_info mcd_info = {
"mcd", /* name of the device type */
};
-
-void __init mcd_setup(char *str, int *ints)
+#ifndef MODULE
+static int __init mcd_setup(char *str)
{
+ int ints[9];
+
+ (void)get_options(str, ARRAY_SIZE(ints), ints);
+
if (ints[0] > 0)
mcd_port = ints[1];
if (ints[0] > 1)
@@ -240,8 +251,13 @@ void __init mcd_setup(char *str, int *ints)
if (ints[0] > 2)
mitsumi_bug_93_wait = ints[3];
#endif /* WORK_AROUND_MITSUMI_BUG_93 */
+
+ return 1;
}
+__setup("mcd=", mcd_setup);
+
+#endif /* MODULE */
static int mcd_media_changed(struct cdrom_device_info * cdi, int disc_nr)
{
@@ -648,7 +664,7 @@ mcd_interrupt(int irq, void *dev_id, struct pt_regs * regs)
static void
-do_mcd_request(void)
+do_mcd_request(request_queue_t * q)
{
#ifdef TEST2
printk(" do_mcd_request(%ld+%ld)\n", CURRENT -> sector, CURRENT -> nr_sectors);
@@ -1127,7 +1143,7 @@ static void mcd_release(struct cdrom_device_info * cdi)
/* This routine gets called during initialization if things go wrong,
- * and is used in cleanup_module as well. */
+ * and is used in mcd_exit as well. */
static void cleanup(int level)
{
switch (level) {
@@ -1179,7 +1195,7 @@ int __init mcd_init(void)
}
blksize_size[MAJOR_NR] = mcd_blocksizes;
- blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST;
+ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
read_ahead[MAJOR_NR] = 4;
/* check for card */
@@ -1635,14 +1651,15 @@ Toc[i].diskTime.min, Toc[i].diskTime.sec, Toc[i].diskTime.frame);
return limit > 0 ? 0 : -1;
}
-#ifdef MODULE
-int init_module(void)
-{
- return mcd_init();
-}
-void cleanup_module(void)
+void __exit mcd_exit(void)
{
cleanup(3);
}
-#endif MODULE
+
+#ifdef MODULE
+module_init(mcd_init);
+#endif
+module_exit(mcd_exit);
+
+