summaryrefslogtreecommitdiff
path: root/drivers/char/synclinkmp.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-04-30 11:53:24 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 19:29:39 +0400
commit1f8cabb7055b98300aa0798ee0f6513dfc130cc2 (patch)
tree79c4991f74a2f3865ab7a7cd23f52e809dc1e5fb /drivers/char/synclinkmp.c
parent341339e7aff33e3aa73d6c49dbd5a79be0bbec04 (diff)
downloadlinux-1f8cabb7055b98300aa0798ee0f6513dfc130cc2.tar.xz
synclink series: Prepare for BKL pushdown
As these are quite complex I've simply pushed the BKL down into the ioctl handler not tried to do anything neater. Signed-off-by: Alan Cox <alan@redhat.com> Cc: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/synclinkmp.c')
-rw-r--r--drivers/char/synclinkmp.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
index e98c3e6f8216..b716a73a236f 100644
--- a/drivers/char/synclinkmp.c
+++ b/drivers/char/synclinkmp.c
@@ -1303,7 +1303,7 @@ static void tx_release(struct tty_struct *tty)
*
* Return Value: 0 if success, otherwise error code
*/
-static int ioctl(struct tty_struct *tty, struct file *file,
+static int do_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg)
{
SLMP_INFO *info = (SLMP_INFO *)tty->driver_data;
@@ -1393,6 +1393,16 @@ static int ioctl(struct tty_struct *tty, struct file *file,
return 0;
}
+static int ioctl(struct tty_struct *tty, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ int ret;
+ lock_kernel();
+ ret = do_ioctl(tty, file, cmd, arg);
+ unlock_kernel();
+ return ret;
+}
+
/*
* /proc fs routines....
*/