diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-08-11 03:36:51 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-08-11 03:36:51 -0400 |
commit | 6396fc3b3ff3f6b942992b653a62df11dcef9bea (patch) | |
tree | db3c7cbe833b43c653adc99f70941431c5ff7c4e /drivers/char/isicom.c | |
parent | 4785879e4d340e24e54f6de2ccfc42728b912808 (diff) | |
parent | 3d30701b58970425e1d45994d6cb82f828924fdd (diff) |
Merge branch 'master' into for-next
Conflicts:
fs/exofs/inode.c
Diffstat (limited to 'drivers/char/isicom.c')
-rw-r--r-- | drivers/char/isicom.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 98310e1aae30..c27e9d21fea9 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -124,7 +124,6 @@ | |||
124 | #include <linux/fs.h> | 124 | #include <linux/fs.h> |
125 | #include <linux/sched.h> | 125 | #include <linux/sched.h> |
126 | #include <linux/serial.h> | 126 | #include <linux/serial.h> |
127 | #include <linux/smp_lock.h> | ||
128 | #include <linux/mm.h> | 127 | #include <linux/mm.h> |
129 | #include <linux/interrupt.h> | 128 | #include <linux/interrupt.h> |
130 | #include <linux/timer.h> | 129 | #include <linux/timer.h> |
@@ -872,7 +871,6 @@ static struct tty_port *isicom_find_port(struct tty_struct *tty) | |||
872 | static int isicom_open(struct tty_struct *tty, struct file *filp) | 871 | static int isicom_open(struct tty_struct *tty, struct file *filp) |
873 | { | 872 | { |
874 | struct isi_port *port; | 873 | struct isi_port *port; |
875 | struct isi_board *card; | ||
876 | struct tty_port *tport; | 874 | struct tty_port *tport; |
877 | 875 | ||
878 | tport = isicom_find_port(tty); | 876 | tport = isicom_find_port(tty); |
@@ -1118,8 +1116,7 @@ static int isicom_set_serial_info(struct tty_struct *tty, | |||
1118 | if (copy_from_user(&newinfo, info, sizeof(newinfo))) | 1116 | if (copy_from_user(&newinfo, info, sizeof(newinfo))) |
1119 | return -EFAULT; | 1117 | return -EFAULT; |
1120 | 1118 | ||
1121 | lock_kernel(); | 1119 | mutex_lock(&port->port.mutex); |
1122 | |||
1123 | reconfig_port = ((port->port.flags & ASYNC_SPD_MASK) != | 1120 | reconfig_port = ((port->port.flags & ASYNC_SPD_MASK) != |
1124 | (newinfo.flags & ASYNC_SPD_MASK)); | 1121 | (newinfo.flags & ASYNC_SPD_MASK)); |
1125 | 1122 | ||
@@ -1128,7 +1125,7 @@ static int isicom_set_serial_info(struct tty_struct *tty, | |||
1128 | (newinfo.closing_wait != port->port.closing_wait) || | 1125 | (newinfo.closing_wait != port->port.closing_wait) || |
1129 | ((newinfo.flags & ~ASYNC_USR_MASK) != | 1126 | ((newinfo.flags & ~ASYNC_USR_MASK) != |
1130 | (port->port.flags & ~ASYNC_USR_MASK))) { | 1127 | (port->port.flags & ~ASYNC_USR_MASK))) { |
1131 | unlock_kernel(); | 1128 | mutex_unlock(&port->port.mutex); |
1132 | return -EPERM; | 1129 | return -EPERM; |
1133 | } | 1130 | } |
1134 | port->port.flags = ((port->port.flags & ~ASYNC_USR_MASK) | | 1131 | port->port.flags = ((port->port.flags & ~ASYNC_USR_MASK) | |
@@ -1145,7 +1142,7 @@ static int isicom_set_serial_info(struct tty_struct *tty, | |||
1145 | isicom_config_port(tty); | 1142 | isicom_config_port(tty); |
1146 | spin_unlock_irqrestore(&port->card->card_lock, flags); | 1143 | spin_unlock_irqrestore(&port->card->card_lock, flags); |
1147 | } | 1144 | } |
1148 | unlock_kernel(); | 1145 | mutex_unlock(&port->port.mutex); |
1149 | return 0; | 1146 | return 0; |
1150 | } | 1147 | } |
1151 | 1148 | ||
@@ -1154,7 +1151,7 @@ static int isicom_get_serial_info(struct isi_port *port, | |||
1154 | { | 1151 | { |
1155 | struct serial_struct out_info; | 1152 | struct serial_struct out_info; |
1156 | 1153 | ||
1157 | lock_kernel(); | 1154 | mutex_lock(&port->port.mutex); |
1158 | memset(&out_info, 0, sizeof(out_info)); | 1155 | memset(&out_info, 0, sizeof(out_info)); |
1159 | /* out_info.type = ? */ | 1156 | /* out_info.type = ? */ |
1160 | out_info.line = port - isi_ports; | 1157 | out_info.line = port - isi_ports; |
@@ -1164,7 +1161,7 @@ static int isicom_get_serial_info(struct isi_port *port, | |||
1164 | /* out_info.baud_base = ? */ | 1161 | /* out_info.baud_base = ? */ |
1165 | out_info.close_delay = port->port.close_delay; | 1162 | out_info.close_delay = port->port.close_delay; |
1166 | out_info.closing_wait = port->port.closing_wait; | 1163 | out_info.closing_wait = port->port.closing_wait; |
1167 | unlock_kernel(); | 1164 | mutex_unlock(&port->port.mutex); |
1168 | if (copy_to_user(info, &out_info, sizeof(out_info))) | 1165 | if (copy_to_user(info, &out_info, sizeof(out_info))) |
1169 | return -EFAULT; | 1166 | return -EFAULT; |
1170 | return 0; | 1167 | return 0; |