aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-11-30 08:18:18 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 18:18:08 -0500
commitf710ebd7f70801e31751f2c49fe4b92a477d24eb (patch)
tree4e1e022e477dd62b39c01fdab7fabbadc10352e8 /drivers/char
parent8482bcd58530ad5857d7187854132f2b846db681 (diff)
tty: moxa: Kill the use of lock_kernel
It isn't needed here any more Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/moxa.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index ac06d0131db5..d53fac5229bf 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -34,7 +34,6 @@
34#include <linux/tty.h> 34#include <linux/tty.h>
35#include <linux/tty_flip.h> 35#include <linux/tty_flip.h>
36#include <linux/major.h> 36#include <linux/major.h>
37#include <linux/smp_lock.h>
38#include <linux/string.h> 37#include <linux/string.h>
39#include <linux/fcntl.h> 38#include <linux/fcntl.h>
40#include <linux/ptrace.h> 39#include <linux/ptrace.h>
@@ -202,7 +201,6 @@ static int moxa_tiocmset(struct tty_struct *tty, struct file *file,
202 unsigned int set, unsigned int clear); 201 unsigned int set, unsigned int clear);
203static void moxa_poll(unsigned long); 202static void moxa_poll(unsigned long);
204static void moxa_set_tty_param(struct tty_struct *, struct ktermios *); 203static void moxa_set_tty_param(struct tty_struct *, struct ktermios *);
205static void moxa_setup_empty_event(struct tty_struct *);
206static void moxa_shutdown(struct tty_port *); 204static void moxa_shutdown(struct tty_port *);
207static int moxa_carrier_raised(struct tty_port *); 205static int moxa_carrier_raised(struct tty_port *);
208static void moxa_dtr_rts(struct tty_port *, int); 206static void moxa_dtr_rts(struct tty_port *, int);
@@ -1251,17 +1249,13 @@ static int moxa_chars_in_buffer(struct tty_struct *tty)
1251 struct moxa_port *ch = tty->driver_data; 1249 struct moxa_port *ch = tty->driver_data;
1252 int chars; 1250 int chars;
1253 1251
1254 lock_kernel();
1255 chars = MoxaPortTxQueue(ch); 1252 chars = MoxaPortTxQueue(ch);
1256 if (chars) { 1253 if (chars)
1257 /* 1254 /*
1258 * Make it possible to wakeup anything waiting for output 1255 * Make it possible to wakeup anything waiting for output
1259 * in tty_ioctl.c, etc. 1256 * in tty_ioctl.c, etc.
1260 */ 1257 */
1261 if (!test_bit(EMPTYWAIT, &ch->statusflags)) 1258 set_bit(EMPTYWAIT, &ch->statusflags);
1262 moxa_setup_empty_event(tty);
1263 }
1264 unlock_kernel();
1265 return chars; 1259 return chars;
1266} 1260}
1267 1261
@@ -1503,12 +1497,6 @@ static void moxa_set_tty_param(struct tty_struct *tty, struct ktermios *old_term
1503 tty_encode_baud_rate(tty, baud, baud); 1497 tty_encode_baud_rate(tty, baud, baud);
1504} 1498}
1505 1499
1506static void moxa_setup_empty_event(struct tty_struct *tty)
1507{
1508 struct moxa_port *ch = tty->driver_data;
1509 set_bit(EMPTYWAIT, &ch->statusflags);
1510}
1511
1512/***************************************************************************** 1500/*****************************************************************************
1513 * Driver level functions: * 1501 * Driver level functions: *
1514 *****************************************************************************/ 1502 *****************************************************************************/