patch-2.3.32 linux/drivers/cdrom/sonycd535.c
Next file: linux/drivers/char/Config.in
Previous file: linux/drivers/cdrom/sjcd.c
Back to the patch index
Back to the overall index
- Lines: 88
- Date:
Mon Dec 13 14:08:40 1999
- Orig file:
v2.3.31/linux/drivers/cdrom/sonycd535.c
- Orig date:
Tue Aug 31 17:29:13 1999
diff -u --recursive --new-file v2.3.31/linux/drivers/cdrom/sonycd535.c linux/drivers/cdrom/sonycd535.c
@@ -31,6 +31,11 @@
* More changes to support CDU-510/515 series
* (Claudio Porfiri<C.Porfiri@nisms.tei.ericsson.se>)
*
+ * 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>
+ *
* Things to do:
* - handle errors and status better, put everything into a single word
* - use interrupts (code mostly there, but a big hole still missing)
@@ -781,7 +786,7 @@
* data access on a CD is done sequentially, this saves a lot of operations.
*/
static void
-do_cdu535_request(void)
+do_cdu535_request(request_queue_t * q)
{
unsigned int dev;
unsigned int read_size;
@@ -1601,7 +1606,7 @@
MAJOR_NR, CDU535_MESSAGE_NAME);
return -EIO;
}
- blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST;
+ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
blksize_size[MAJOR_NR] = &sonycd535_block_size;
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB) read-ahead */
@@ -1648,6 +1653,7 @@
}
#ifndef MODULE
+
/*
* accept "kernel command line" parameters
* (added by emoenke@gwdg.de)
@@ -1657,9 +1663,11 @@
*
* the address value has to be the existing CDROM port address.
*/
-void __init
-sonycd535_setup(char *strings, int *ints)
+static int __init
+sonycd535_setup(char *strings)
{
+ int ints[3];
+ (void)get_options(strings, ARRAY_SIZE(ints), ints);
/* if IRQ change and default io base desired,
* then call with io base of 0
*/
@@ -1671,17 +1679,16 @@
if ((strings != NULL) && (*strings != '\0'))
printk(CDU535_MESSAGE_NAME
": Warning: Unknown interface type: %s\n", strings);
+
+ return 1;
}
-#else /* MODULE */
+__setup("sonycd535=", sonycd535_setup);
-int init_module(void)
-{
- return sony535_init();
-}
+#endif /* MODULE */
-void
-cleanup_module(void)
+void __exit
+sony535_exit(void)
{
int i;
@@ -1696,4 +1703,10 @@
else
printk(KERN_INFO CDU535_HANDLE " module released\n");
}
-#endif /* MODULE */
+
+#ifdef MODULE
+module_init(sony535_init);
+#endif
+module_exit(sony535_exit);
+
+
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)