Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / drivers / char / serial167.c
index ecbe479..f646725 100644 (file)
@@ -1505,7 +1505,7 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
        printk("cy_ioctl %s, cmd = %x arg = %lx\n", tty->name, cmd, arg);       /* */
 #endif
 
-       lock_kernel();
+       tty_lock();
 
        switch (cmd) {
        case CYGETMON:
@@ -1561,7 +1561,7 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
        default:
                ret_val = -ENOIOCTLCMD;
        }
-       unlock_kernel();
+       tty_unlock();
 
 #ifdef SERIAL_DEBUG_OTHER
        printk("cy_ioctl done\n");
@@ -1786,7 +1786,9 @@ block_til_ready(struct tty_struct *tty, struct file *filp,
                       tty->name, info->count);
                /**/
 #endif
-                   schedule();
+               tty_unlock();
+               schedule();
+               tty_lock();
        }
        __set_current_state(TASK_RUNNING);
        remove_wait_queue(&info->open_wait, &wait);