lkml.org 
[lkml]   [2008]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] crisv10: prepare for BKL push down
Just the modem bits this time

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.25-rc2-mm1/drivers/serial/crisv10.c linux-2.6.25-rc2-mm1/drivers/serial/crisv10.c
--- linux.vanilla-2.6.25-rc2-mm1/drivers/serial/crisv10.c 2008-02-19 11:03:01.000000000 +0000
+++ linux-2.6.25-rc2-mm1/drivers/serial/crisv10.c 2008-02-20 11:52:24.000000000 +0000
@@ -3581,6 +3581,8 @@
unsigned int set, unsigned int clear)
{
struct e100_serial *info = (struct e100_serial *)tty->driver_data;
+
+ lock_kernel();

if (clear & TIOCM_RTS)
e100_rts(info, 0);
@@ -3601,6 +3603,8 @@
e100_ri_out(info, 1);
if (set & TIOCM_CD)
e100_cd_out(info, 1);
+
+ unlock_kernel();
return 0;
}

@@ -3610,6 +3614,7 @@
struct e100_serial *info = (struct e100_serial *)tty->driver_data;
unsigned int result;

+ lock_kernel();
result =
(!E100_RTS_GET(info) ? TIOCM_RTS : 0)
| (!E100_DTR_GET(info) ? TIOCM_DTR : 0)
@@ -3617,6 +3622,8 @@
| (!E100_DSR_GET(info) ? TIOCM_DSR : 0)
| (!E100_CD_GET(info) ? TIOCM_CAR : 0)
| (!E100_CTS_GET(info) ? TIOCM_CTS : 0);
+
+ unlock_kernel();

#ifdef SERIAL_DEBUG_IO
printk(KERN_DEBUG "ser%i: modem state: %i 0x%08X\n",

\
 
 \ /
  Last update: 2008-02-20 21:55    [W:0.038 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site