diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-04 07:40:19 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-04 07:40:19 +0000 |
commit | 33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 (patch) | |
tree | 2d1b86a40bef0958a68cf1a2eafbeb0667a70543 /drivers/cdrom/sonycd535.c | |
parent | 216f5f51aa02f8b113aa620ebc14a9631a217a00 (diff) |
Merge with Linux 2.3.32.
Diffstat (limited to 'drivers/cdrom/sonycd535.c')
-rw-r--r-- | drivers/cdrom/sonycd535.c | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/drivers/cdrom/sonycd535.c b/drivers/cdrom/sonycd535.c index 79bad95de..10e693c47 100644 --- a/drivers/cdrom/sonycd535.c +++ b/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 @@ size_to_buf(unsigned int size, Byte *buf) * 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 @@ sony535_init(void) 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 @@ sony535_init(void) } #ifndef MODULE + /* * accept "kernel command line" parameters * (added by emoenke@gwdg.de) @@ -1657,9 +1663,11 @@ sony535_init(void) * * 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 @@ sonycd535_setup(char *strings, int *ints) 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 @@ cleanup_module(void) else printk(KERN_INFO CDU535_HANDLE " module released\n"); } -#endif /* MODULE */ + +#ifdef MODULE +module_init(sony535_init); +#endif +module_exit(sony535_exit); + + |