aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-04-28 05:13:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:28 -0400
commit032c17e8afa150412810ffc19913ecd5eb531d57 (patch)
tree64169680149f0d8a9ff01eeeeaa2efd151e9968c /drivers/serial
parentf85e7cdc3fd0db65ef1442476b82ced0f01c5c19 (diff)
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>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/crisv10.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c
index 383c4e660cd5..88e7c1d5b919 100644
--- a/drivers/serial/crisv10.c
+++ b/drivers/serial/crisv10.c
@@ -3582,6 +3582,8 @@ rs_tiocmset(struct tty_struct *tty, struct file *file,
3582{ 3582{
3583 struct e100_serial *info = (struct e100_serial *)tty->driver_data; 3583 struct e100_serial *info = (struct e100_serial *)tty->driver_data;
3584 3584
3585 lock_kernel();
3586
3585 if (clear & TIOCM_RTS) 3587 if (clear & TIOCM_RTS)
3586 e100_rts(info, 0); 3588 e100_rts(info, 0);
3587 if (clear & TIOCM_DTR) 3589 if (clear & TIOCM_DTR)
@@ -3601,6 +3603,8 @@ rs_tiocmset(struct tty_struct *tty, struct file *file,
3601 e100_ri_out(info, 1); 3603 e100_ri_out(info, 1);
3602 if (set & TIOCM_CD) 3604 if (set & TIOCM_CD)
3603 e100_cd_out(info, 1); 3605 e100_cd_out(info, 1);
3606
3607 unlock_kernel();
3604 return 0; 3608 return 0;
3605} 3609}
3606 3610
@@ -3610,6 +3614,7 @@ rs_tiocmget(struct tty_struct *tty, struct file *file)
3610 struct e100_serial *info = (struct e100_serial *)tty->driver_data; 3614 struct e100_serial *info = (struct e100_serial *)tty->driver_data;
3611 unsigned int result; 3615 unsigned int result;
3612 3616
3617 lock_kernel();
3613 result = 3618 result =
3614 (!E100_RTS_GET(info) ? TIOCM_RTS : 0) 3619 (!E100_RTS_GET(info) ? TIOCM_RTS : 0)
3615 | (!E100_DTR_GET(info) ? TIOCM_DTR : 0) 3620 | (!E100_DTR_GET(info) ? TIOCM_DTR : 0)
@@ -3618,6 +3623,8 @@ rs_tiocmget(struct tty_struct *tty, struct file *file)
3618 | (!E100_CD_GET(info) ? TIOCM_CAR : 0) 3623 | (!E100_CD_GET(info) ? TIOCM_CAR : 0)
3619 | (!E100_CTS_GET(info) ? TIOCM_CTS : 0); 3624 | (!E100_CTS_GET(info) ? TIOCM_CTS : 0);
3620 3625
3626 unlock_kernel();
3627
3621#ifdef SERIAL_DEBUG_IO 3628#ifdef SERIAL_DEBUG_IO
3622 printk(KERN_DEBUG "ser%i: modem state: %i 0x%08X\n", 3629 printk(KERN_DEBUG "ser%i: modem state: %i 0x%08X\n",
3623 info->line, result, result); 3630 info->line, result, result);