diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-04-30 03:53:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 11:29:39 -0400 |
commit | f433c65b8acb5346e6fefff4e4b97711c987ccf9 (patch) | |
tree | f4b2f5dd3b47ba3051a9c495d413407b4338fd91 /drivers/char | |
parent | b190e178f63e8dad7755054e02dc18a24ea6f0ac (diff) |
stallion: Prepare for BKL push down
Remove broken softcar functions, wrap ioctl handler in BKL
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/stallion.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 874aaa08e956..983244ab1362 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c | |||
@@ -1273,18 +1273,9 @@ static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd | |||
1273 | 1273 | ||
1274 | rc = 0; | 1274 | rc = 0; |
1275 | 1275 | ||
1276 | lock_kernel(); | ||
1277 | |||
1276 | switch (cmd) { | 1278 | switch (cmd) { |
1277 | case TIOCGSOFTCAR: | ||
1278 | rc = put_user(((tty->termios->c_cflag & CLOCAL) ? 1 : 0), | ||
1279 | (unsigned __user *) argp); | ||
1280 | break; | ||
1281 | case TIOCSSOFTCAR: | ||
1282 | if (get_user(ival, (unsigned int __user *) arg)) | ||
1283 | return -EFAULT; | ||
1284 | tty->termios->c_cflag = | ||
1285 | (tty->termios->c_cflag & ~CLOCAL) | | ||
1286 | (ival ? CLOCAL : 0); | ||
1287 | break; | ||
1288 | case TIOCGSERIAL: | 1279 | case TIOCGSERIAL: |
1289 | rc = stl_getserial(portp, argp); | 1280 | rc = stl_getserial(portp, argp); |
1290 | break; | 1281 | break; |
@@ -1308,7 +1299,7 @@ static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd | |||
1308 | rc = -ENOIOCTLCMD; | 1299 | rc = -ENOIOCTLCMD; |
1309 | break; | 1300 | break; |
1310 | } | 1301 | } |
1311 | 1302 | unlock_kernel(); | |
1312 | return rc; | 1303 | return rc; |
1313 | } | 1304 | } |
1314 | 1305 | ||