vserver 1.9.5.x5
[linux-2.6.git] / drivers / char / tpqic02.c
index 6ee95af..d812253 100644 (file)
@@ -554,10 +554,9 @@ static int wait_for_ready(time_t timeout)
            /* not ready and no exception && timeout not expired yet */
        while (((stat = inb_p(QIC02_STAT_PORT) & QIC02_STAT_MASK) == QIC02_STAT_MASK) && time_before(jiffies, spin_t)) {
                /* be `nice` to other processes on long operations... */
-               current->state = TASK_INTERRUPTIBLE;
                /* nap 0.30 sec between checks, */
                /* but could be woken up earlier by signals... */
-               schedule_timeout(3 * HZ / 10);
+               msleep_interruptible(300);
        }
 
        /* don't use jiffies for this test because it may have changed by now */
@@ -898,7 +897,7 @@ static int ll_do_qic_cmd(int cmd, time_t timeout)
                printk(TPQIC02_NAME ": ll_do_qic_cmd(%x, %ld) failed\n", cmd, (long) timeout);
                return -EIO;
        }
-#if OBSOLETE
+#ifdef OBSOLETE
        /* wait for ready since it may not be active immediately after reading status */
        while ((inb_p(QIC02_STAT_PORT) & QIC02_STAT_READY) != 0)
                cpu_relax();
@@ -1419,7 +1418,7 @@ static int start_dma(short mode, unsigned long bytes_todo)
                if (stat != TE_OK)
                        return stat;
 
-#if OBSOLETE
+#ifdef OBSOLETE
                /************* not needed iff rd_status() would wait for ready!!!!!! **********/
                if (wait_for_ready(TIM_S) != TE_OK) {   /*** not sure this is needed ***/
                        tpqputs(TPQD_ALWAYS, "wait_for_ready failed in start_dma");
@@ -2589,7 +2588,7 @@ static void qic02_release_resources(void)
        release_region(QIC02_TAPE_PORT, QIC02_TAPE_PORT_RANGE);
        if (buffaddr)
                free_pages((unsigned long) buffaddr, get_order(TPQBUF_SIZE));
-       buffaddr = 0;           /* Better to cause a panic than overwite someone else */
+       buffaddr = NULL;        /* Better to cause a panic than overwite someone else */
        status_zombie = YES;
 }                              /* qic02_release_resources */