Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207893
b: refs/heads/master
c: 7479db0
h: refs/heads/master
i:
  207891: 4043515
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent 19cfeb3 commit 700733c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7cc34fd028ef35b12fec0fa9268c37c099d33bd2
refs/heads/master: 7479db07011c9c85a65eeb03724193230af0a99d
11 changes: 5 additions & 6 deletions trunk/drivers/char/specialix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1863,8 +1863,7 @@ static int sx_set_serial_info(struct specialix_port *port,
return -EFAULT;
}

lock_kernel();

mutex_lock(&port->port.mutex);
change_speed = ((port->port.flags & ASYNC_SPD_MASK) !=
(tmp.flags & ASYNC_SPD_MASK));
change_speed |= (tmp.custom_divisor != port->custom_divisor);
Expand All @@ -1875,7 +1874,7 @@ static int sx_set_serial_info(struct specialix_port *port,
((tmp.flags & ~ASYNC_USR_MASK) !=
(port->port.flags & ~ASYNC_USR_MASK))) {
func_exit();
unlock_kernel();
mutex_unlock(&port->port.mutex);
return -EPERM;
}
port->port.flags = ((port->port.flags & ~ASYNC_USR_MASK) |
Expand All @@ -1892,7 +1891,7 @@ static int sx_set_serial_info(struct specialix_port *port,
sx_change_speed(bp, port);

func_exit();
unlock_kernel();
mutex_unlock(&port->port.mutex);
return 0;
}

Expand All @@ -1906,7 +1905,7 @@ static int sx_get_serial_info(struct specialix_port *port,
func_enter();

memset(&tmp, 0, sizeof(tmp));
lock_kernel();
mutex_lock(&port->port.mutex);
tmp.type = PORT_CIRRUS;
tmp.line = port - sx_port;
tmp.port = bp->base;
Expand All @@ -1917,7 +1916,7 @@ static int sx_get_serial_info(struct specialix_port *port,
tmp.closing_wait = port->port.closing_wait * HZ/100;
tmp.custom_divisor = port->custom_divisor;
tmp.xmit_fifo_size = CD186x_NFIFO;
unlock_kernel();
mutex_unlock(&port->port.mutex);
if (copy_to_user(retinfo, &tmp, sizeof(tmp))) {
func_exit();
return -EFAULT;
Expand Down

0 comments on commit 700733c

Please sign in to comment.