]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/n_r3964.c
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-omap-h63xx.git] / drivers / char / n_r3964.c
index fab1b7d42858ad5a258863a84b43cf12e150f500..14557a4822c0354047b804a2287846a725297955 100644 (file)
@@ -1005,9 +1005,7 @@ static int r3964_open(struct tty_struct *tty)
        tty->disc_data = pInfo;
        tty->receive_room = 65536;
 
-       init_timer(&pInfo->tmr);
-       pInfo->tmr.data = (unsigned long)pInfo;
-       pInfo->tmr.function = on_timeout;
+       setup_timer(&pInfo->tmr, on_timeout, (unsigned long)pInfo);
 
        return 0;
 }
@@ -1090,13 +1088,13 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
                        /* block until there is a message: */
                        add_wait_queue(&pInfo->read_wait, &wait);
 repeat:
-                       current->state = TASK_INTERRUPTIBLE;
+                       __set_current_state(TASK_INTERRUPTIBLE);
                        pMsg = remove_msg(pInfo, pClient);
                        if (!pMsg && !signal_pending(current)) {
                                schedule();
                                goto repeat;
                        }
-                       current->state = TASK_RUNNING;
+                       __set_current_state(TASK_RUNNING);
                        remove_wait_queue(&pInfo->read_wait, &wait);
                }