Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94070
b: refs/heads/master
c: 032c17e
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Apr 28, 2008
1 parent 14783f7 commit ed33375
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f85e7cdc3fd0db65ef1442476b82ced0f01c5c19
refs/heads/master: 032c17e8afa150412810ffc19913ecd5eb531d57
7 changes: 7 additions & 0 deletions trunk/drivers/serial/crisv10.c
Original file line number Diff line number Diff line change
Expand Up @@ -3582,6 +3582,8 @@ rs_tiocmset(struct tty_struct *tty, struct file *file,
{
struct e100_serial *info = (struct e100_serial *)tty->driver_data;

lock_kernel();

if (clear & TIOCM_RTS)
e100_rts(info, 0);
if (clear & TIOCM_DTR)
Expand All @@ -3601,6 +3603,8 @@ rs_tiocmset(struct tty_struct *tty, struct file *file,
e100_ri_out(info, 1);
if (set & TIOCM_CD)
e100_cd_out(info, 1);

unlock_kernel();
return 0;
}

Expand All @@ -3610,6 +3614,7 @@ rs_tiocmget(struct tty_struct *tty, struct file *file)
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)
Expand All @@ -3618,6 +3623,8 @@ rs_tiocmget(struct tty_struct *tty, struct file *file)
| (!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",
info->line, result, result);
Expand Down

0 comments on commit ed33375

Please sign in to comment.