patch-2.3.46 linux/drivers/cdrom/cdu31a.c

Next file: linux/drivers/cdrom/cm206.c
Previous file: linux/drivers/cdrom/cdrom.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.45/linux/drivers/cdrom/cdu31a.c linux/drivers/cdrom/cdu31a.c
@@ -162,6 +162,7 @@
 #include <linux/hdreg.h>
 #include <linux/genhd.h>
 #include <linux/ioport.h>
+#include <linux/devfs_fs_kernel.h>
 #include <linux/string.h>
 #include <linux/malloc.h>
 #include <linux/init.h>
@@ -1672,7 +1673,7 @@
       if (signal_pending(current))
       {
          restore_flags(flags);
-         if (CURRENT && CURRENT->rq_status != RQ_INACTIVE)
+         if (!QUEUE_EMPTY && CURRENT->rq_status != RQ_INACTIVE)
          {
             end_request(0);
          }
@@ -1705,7 +1706,7 @@
        * 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)
       {
          goto end_do_cdu31a_request;
       }
@@ -3441,7 +3442,7 @@
 
       request_region(cdu31a_port, 4,"cdu31a");
       
-      if (register_blkdev(MAJOR_NR,"cdu31a",&cdrom_fops))
+      if (devfs_register_blkdev(MAJOR_NR,"cdu31a",&cdrom_fops))
       {
 	 printk("Unable to get major %d for CDU-31a\n", MAJOR_NR);
          goto errout2;
@@ -3543,7 +3544,7 @@
    }
 errout0:
    printk("Unable to register CDU-31a with Uniform cdrom driver\n");
-   if (unregister_blkdev(MAJOR_NR, "cdu31a"))    
+   if (devfs_unregister_blkdev(MAJOR_NR, "cdu31a"))    
    {
       printk("Can't unregister block device for cdu31a\n");
    }
@@ -3562,7 +3563,7 @@
       printk("Can't unregister cdu31a from Uniform cdrom driver\n");
       return;
    }
-   if ((unregister_blkdev(MAJOR_NR, "cdu31a") == -EINVAL))    
+   if ((devfs_unregister_blkdev(MAJOR_NR, "cdu31a") == -EINVAL))    
    {
       printk("Can't unregister cdu31a\n");
       return;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)