]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/osst.c
[SCSI] scsi: Convertion to struct scsi_cmnd in ips-driver
[linux-2.6-omap-h63xx.git] / drivers / scsi / osst.c
index 66ea47a9c53c74774e95f584f484761e0e2ff3f7..9ecb323ebae8fa4bf78a5a67840798ae0f450f14 100644 (file)
@@ -49,6 +49,7 @@ static const char * osst_version = "0.99.4";
 #include <linux/blkdev.h>
 #include <linux/moduleparam.h>
 #include <linux/delay.h>
+#include <linux/jiffies.h>
 #include <asm/uaccess.h>
 #include <asm/dma.h>
 #include <asm/system.h>
@@ -856,7 +857,7 @@ static int osst_wait_frame(struct osst_tape * STp, struct osst_request ** aSRpnt
                    ) && result >= 0)
                {
 #if DEBUG                      
-                       if (debugging || jiffies - startwait >= 2*HZ/OSST_POLL_PER_SEC)
+                       if (debugging || time_after_eq(jiffies, startwait + 2*HZ/OSST_POLL_PER_SEC))
                                printk (OSST_DEB_MSG
                                        "%s:D: Succ wait f fr %i (>%i): %i-%i %i (%i): %3li.%li s\n",
                                        name, curr, curr+minlast, STp->first_frame_position,
@@ -867,7 +868,7 @@ static int osst_wait_frame(struct osst_tape * STp, struct osst_request ** aSRpnt
                        return 0;
                }
 #if DEBUG
-               if (jiffies - startwait >= 2*HZ/OSST_POLL_PER_SEC && notyetprinted)
+               if (time_after_eq(jiffies, startwait + 2*HZ/OSST_POLL_PER_SEC) && notyetprinted)
                {
                        printk (OSST_DEB_MSG "%s:D: Wait for frame %i (>%i): %i-%i %i (%i)\n",
                                name, curr, curr+minlast, STp->first_frame_position,
@@ -4723,7 +4724,7 @@ err_out:
 
 
 /* Flush the tape buffer before close */
-static int os_scsi_tape_flush(struct file * filp)
+static int os_scsi_tape_flush(struct file * filp, fl_owner_t id)
 {
        int                   result = 0, result2;
        struct osst_tape    * STp    = filp->private_data;
@@ -4842,8 +4843,7 @@ static int os_scsi_tape_close(struct inode * inode, struct file * filp)
 static int osst_ioctl(struct inode * inode,struct file * file,
         unsigned int cmd_in, unsigned long arg)
 {
-       int                   i, cmd_nr, cmd_type, retval = 0;
-       unsigned int          blk;
+       int                   i, cmd_nr, cmd_type, blk, retval = 0;
        struct st_modedef   * STm;
        struct st_partstat  * STps;
        struct osst_request * SRpnt = NULL;
@@ -5491,7 +5491,7 @@ static int __init osst_setup (char *str)
   char *stp;
 
   stp = get_options(str, ARRAY_SIZE(ints), ints);
-       
+
   if (ints[0] > 0) {
        for (i = 0; i < ints[0] && i < ARRAY_SIZE(parms); i++)
                  *parms[i].val = ints[i + 1];
@@ -5506,7 +5506,7 @@ static int __init osst_setup (char *str)
                                break;
                        }
                }
-               if (i >= sizeof(parms) / sizeof(struct osst_dev_parm))
+               if (i >= ARRAY_SIZE(parms))
                        printk(KERN_INFO "osst :I: Illegal parameter in '%s'\n",
                               stp);
                stp = strchr(stp, ',');