aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-11-30 08:18:08 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 18:18:08 -0500
commitf9b412a8c9adb17d50922f91962e8b1e48789430 (patch)
tree164dfac6da93d447aae5e74b7a4bd73a694b1480 /drivers/char
parenta808ac0c4a2c5d81ba38a2a76d4ddc1de40d1539 (diff)
tty: moxa: Kill off the throttle method
The tty flag can be tested so the shadow flag isn't needed 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.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 7ab720f1f30c..d180aa965a5a 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -154,7 +154,6 @@ struct mon_str {
154#define TXSTOPPED 1 154#define TXSTOPPED 1
155#define LOWWAIT 2 155#define LOWWAIT 2
156#define EMPTYWAIT 3 156#define EMPTYWAIT 3
157#define THROTTLE 4
158 157
159#define SERIAL_DO_RESTART 158#define SERIAL_DO_RESTART
160 159
@@ -194,8 +193,6 @@ static int moxa_write(struct tty_struct *, const unsigned char *, int);
194static int moxa_write_room(struct tty_struct *); 193static int moxa_write_room(struct tty_struct *);
195static void moxa_flush_buffer(struct tty_struct *); 194static void moxa_flush_buffer(struct tty_struct *);
196static int moxa_chars_in_buffer(struct tty_struct *); 195static int moxa_chars_in_buffer(struct tty_struct *);
197static void moxa_throttle(struct tty_struct *);
198static void moxa_unthrottle(struct tty_struct *);
199static void moxa_set_termios(struct tty_struct *, struct ktermios *); 196static void moxa_set_termios(struct tty_struct *, struct ktermios *);
200static void moxa_stop(struct tty_struct *); 197static void moxa_stop(struct tty_struct *);
201static void moxa_start(struct tty_struct *); 198static void moxa_start(struct tty_struct *);
@@ -415,8 +412,6 @@ static const struct tty_operations moxa_ops = {
415 .flush_buffer = moxa_flush_buffer, 412 .flush_buffer = moxa_flush_buffer,
416 .chars_in_buffer = moxa_chars_in_buffer, 413 .chars_in_buffer = moxa_chars_in_buffer,
417 .ioctl = moxa_ioctl, 414 .ioctl = moxa_ioctl,
418 .throttle = moxa_throttle,
419 .unthrottle = moxa_unthrottle,
420 .set_termios = moxa_set_termios, 415 .set_termios = moxa_set_termios,
421 .stop = moxa_stop, 416 .stop = moxa_stop,
422 .start = moxa_start, 417 .start = moxa_start,
@@ -1327,20 +1322,6 @@ static int moxa_tiocmset(struct tty_struct *tty, struct file *file,
1327 return 0; 1322 return 0;
1328} 1323}
1329 1324
1330static void moxa_throttle(struct tty_struct *tty)
1331{
1332 struct moxa_port *ch = tty->driver_data;
1333
1334 set_bit(THROTTLE, &ch->statusflags);
1335}
1336
1337static void moxa_unthrottle(struct tty_struct *tty)
1338{
1339 struct moxa_port *ch = tty->driver_data;
1340
1341 clear_bit(THROTTLE, &ch->statusflags);
1342}
1343
1344static void moxa_set_termios(struct tty_struct *tty, 1325static void moxa_set_termios(struct tty_struct *tty,
1345 struct ktermios *old_termios) 1326 struct ktermios *old_termios)
1346{ 1327{
@@ -1418,7 +1399,7 @@ static int moxa_poll_port(struct moxa_port *p, unsigned int handle,
1418 tty_wakeup(tty); 1399 tty_wakeup(tty);
1419 } 1400 }
1420 1401
1421 if (inited && !test_bit(THROTTLE, &p->statusflags) && 1402 if (inited && !test_bit(TTY_THROTTLED, &tty->flags) &&
1422 MoxaPortRxQueue(p) > 0) { /* RX */ 1403 MoxaPortRxQueue(p) > 0) { /* RX */
1423 MoxaPortReadData(p); 1404 MoxaPortReadData(p);
1424 tty_schedule_flip(tty); 1405 tty_schedule_flip(tty);