diff options
Diffstat (limited to 'drivers/char/stallion.c')
-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 | ||