diff options
author | Alan Cox <alan@redhat.com> | 2009-01-02 08:48:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 13:19:42 -0500 |
commit | 6b447f04a9aecdf2a30c1a97e4b034ac7931bb70 (patch) | |
tree | 61a92b936c0c8e42ebf93e01acbc15aceb9bd864 /drivers/usb/serial/usb-serial.c | |
parent | eeb4613436f0f19a38f667ea3078821040559c68 (diff) |
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>
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 8d5189096470..080ade223d53 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -382,9 +382,7 @@ static int serial_ioctl(struct tty_struct *tty, struct file *file, | |||
382 | /* pass on to the driver specific version of this function | 382 | /* pass on to the driver specific version of this function |
383 | if it is available */ | 383 | if it is available */ |
384 | if (port->serial->type->ioctl) { | 384 | if (port->serial->type->ioctl) { |
385 | lock_kernel(); | ||
386 | retval = port->serial->type->ioctl(tty, file, cmd, arg); | 385 | retval = port->serial->type->ioctl(tty, file, cmd, arg); |
387 | unlock_kernel(); | ||
388 | } else | 386 | } else |
389 | retval = -ENOIOCTLCMD; | 387 | retval = -ENOIOCTLCMD; |
390 | return retval; | 388 | return retval; |
@@ -413,11 +411,8 @@ static int serial_break(struct tty_struct *tty, int break_state) | |||
413 | WARN_ON(!port->port.count); | 411 | WARN_ON(!port->port.count); |
414 | /* pass on to the driver specific version of this function | 412 | /* pass on to the driver specific version of this function |
415 | if it is available */ | 413 | if it is available */ |
416 | if (port->serial->type->break_ctl) { | 414 | if (port->serial->type->break_ctl) |
417 | lock_kernel(); | ||
418 | port->serial->type->break_ctl(tty, break_state); | 415 | port->serial->type->break_ctl(tty, break_state); |
419 | unlock_kernel(); | ||
420 | } | ||
421 | return 0; | 416 | return 0; |
422 | } | 417 | } |
423 | 418 | ||