Skip to content

Commit 032c17e

Browse files
Alan-Coxtorvalds
authored andcommitted
crisv10: prepare for BKL push down
Just the modem bits this time Signed-off-by: Alan Cox <alan@redhat.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent f85e7cd commit 032c17e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎drivers/serial/crisv10.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3582,6 +3582,8 @@ rs_tiocmset(struct tty_struct *tty, struct file *file,
35823582
{
35833583
struct e100_serial *info = (struct e100_serial *)tty->driver_data;
35843584

3585+
lock_kernel();
3586+
35853587
if (clear & TIOCM_RTS)
35863588
e100_rts(info, 0);
35873589
if (clear & TIOCM_DTR)
@@ -3601,6 +3603,8 @@ rs_tiocmset(struct tty_struct *tty, struct file *file,
36013603
e100_ri_out(info, 1);
36023604
if (set & TIOCM_CD)
36033605
e100_cd_out(info, 1);
3606+
3607+
unlock_kernel();
36043608
return 0;
36053609
}
36063610

@@ -3610,6 +3614,7 @@ rs_tiocmget(struct tty_struct *tty, struct file *file)
36103614
struct e100_serial *info = (struct e100_serial *)tty->driver_data;
36113615
unsigned int result;
36123616

3617+
lock_kernel();
36133618
result =
36143619
(!E100_RTS_GET(info) ? TIOCM_RTS : 0)
36153620
| (!E100_DTR_GET(info) ? TIOCM_DTR : 0)
@@ -3618,6 +3623,8 @@ rs_tiocmget(struct tty_struct *tty, struct file *file)
36183623
| (!E100_CD_GET(info) ? TIOCM_CAR : 0)
36193624
| (!E100_CTS_GET(info) ? TIOCM_CTS : 0);
36203625

3626+
unlock_kernel();
3627+
36213628
#ifdef SERIAL_DEBUG_IO
36223629
printk(KERN_DEBUG "ser%i: modem state: %i 0x%08X\n",
36233630
info->line, result, result);

0 commit comments

Comments
 (0)