tty: Drop the lock_kernel in the private ioctl hook

We don't need the BKL here any more so it can go. In a couple of spots the
driver requirements are not clear so push the lock down into the driver.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Alan Cox
2009-01-02 13:48:56 +00:00
committed by Linus Torvalds
parent eeb4613436
commit 6b447f04a9
5 changed files with 14 additions and 8 deletions

View File

@@ -382,9 +382,7 @@ static int serial_ioctl(struct tty_struct *tty, struct file *file,
/* pass on to the driver specific version of this function
if it is available */
if (port->serial->type->ioctl) {
lock_kernel();
retval = port->serial->type->ioctl(tty, file, cmd, arg);
unlock_kernel();
} else
retval = -ENOIOCTLCMD;
return retval;
@@ -413,11 +411,8 @@ static int serial_break(struct tty_struct *tty, int break_state)
WARN_ON(!port->port.count);
/* pass on to the driver specific version of this function
if it is available */
if (port->serial->type->break_ctl) {
lock_kernel();
if (port->serial->type->break_ctl)
port->serial->type->break_ctl(tty, break_state);
unlock_kernel();
}
return 0;
}