Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175359
b: refs/heads/master
c: f710ebd
h: refs/heads/master
i:
  175357: 6eff78f
  175355: 2a6aa77
  175351: 46496dd
  175343: 8f53eb3
  175327: bbb2016
  175295: 9f4303b
  175231: c8826b7
  175103: 9165d49
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent c9d1bc8 commit e3cdc93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 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: 8482bcd58530ad5857d7187854132f2b846db681
refs/heads/master: f710ebd7f70801e31751f2c49fe4b92a477d24eb
16 changes: 2 additions & 14 deletions trunk/drivers/char/moxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/major.h>
#include <linux/smp_lock.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
Expand Down Expand Up @@ -202,7 +201,6 @@ static int moxa_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear);
static void moxa_poll(unsigned long);
static void moxa_set_tty_param(struct tty_struct *, struct ktermios *);
static void moxa_setup_empty_event(struct tty_struct *);
static void moxa_shutdown(struct tty_port *);
static int moxa_carrier_raised(struct tty_port *);
static void moxa_dtr_rts(struct tty_port *, int);
Expand Down Expand Up @@ -1251,17 +1249,13 @@ static int moxa_chars_in_buffer(struct tty_struct *tty)
struct moxa_port *ch = tty->driver_data;
int chars;

lock_kernel();
chars = MoxaPortTxQueue(ch);
if (chars) {
if (chars)
/*
* Make it possible to wakeup anything waiting for output
* in tty_ioctl.c, etc.
*/
if (!test_bit(EMPTYWAIT, &ch->statusflags))
moxa_setup_empty_event(tty);
}
unlock_kernel();
set_bit(EMPTYWAIT, &ch->statusflags);
return chars;
}

Expand Down Expand Up @@ -1503,12 +1497,6 @@ static void moxa_set_tty_param(struct tty_struct *tty, struct ktermios *old_term
tty_encode_baud_rate(tty, baud, baud);
}

static void moxa_setup_empty_event(struct tty_struct *tty)
{
struct moxa_port *ch = tty->driver_data;
set_bit(EMPTYWAIT, &ch->statusflags);
}

/*****************************************************************************
* Driver level functions: *
*****************************************************************************/
Expand Down

0 comments on commit e3cdc93

Please sign in to comment.