diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
commit | 482368b1a8e45430672c58c9a42e7d2004367126 (patch) | |
tree | ce2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /drivers/cdrom/sonycd535.c | |
parent | e4d0251c6f56ab2e191afb70f80f382793e23f74 (diff) |
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'drivers/cdrom/sonycd535.c')
-rw-r--r-- | drivers/cdrom/sonycd535.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/cdrom/sonycd535.c b/drivers/cdrom/sonycd535.c index a9b82571e..1f5fea7b9 100644 --- a/drivers/cdrom/sonycd535.c +++ b/drivers/cdrom/sonycd535.c @@ -124,6 +124,7 @@ #include <linux/mm.h> #include <linux/malloc.h> #include <linux/init.h> +#include <linux/devfs_fs_kernel.h> #define REALLY_SLOW_IO #include <asm/system.h> @@ -803,7 +804,7 @@ do_cdu535_request(request_queue_t * q) * The beginning here is stolen from the hard disk driver. I hope * it's right. */ - if (!(CURRENT) || CURRENT->rq_status == RQ_INACTIVE) { + if (QUEUE_EMPTY || CURRENT->rq_status == RQ_INACTIVE) { return; } INIT_REQUEST; @@ -1586,7 +1587,12 @@ sony535_init(void) printk("IRQ%d, ", tmp_irq); printk("using %d byte buffer\n", sony_buffer_size); - if (register_blkdev(MAJOR_NR, CDU535_HANDLE, &cdu_fops)) { + devfs_register (NULL, CDU535_HANDLE, 0, + DEVFS_FL_DEFAULT, + MAJOR_NR, 0, + S_IFBLK | S_IRUGO | S_IWUGO, + 0, 0, &cdu_fops, NULL); + if (devfs_register_blkdev(MAJOR_NR, CDU535_HANDLE, &cdu_fops)) { printk("Unable to get major %d for %s\n", MAJOR_NR, CDU535_MESSAGE_NAME); return -EIO; @@ -1684,7 +1690,9 @@ sony535_exit(void) kfree_s(sony_buffer, 4 * sony_buffer_sectors); kfree_s(last_sony_subcode, sizeof *last_sony_subcode); kfree_s(sony_toc, sizeof *sony_toc); - if (unregister_blkdev(MAJOR_NR, CDU535_HANDLE) == -EINVAL) + devfs_unregister(devfs_find_handle(NULL, CDU535_HANDLE, 0, 0, 0, + DEVFS_SPECIAL_BLK, 0)); + if (devfs_unregister_blkdev(MAJOR_NR, CDU535_HANDLE) == -EINVAL) printk("Uh oh, couldn't unregister " CDU535_HANDLE "\n"); else printk(KERN_INFO CDU535_HANDLE " module released\n"); |