diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-03-05 08:52:26 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 15:30:51 -0500 |
commit | 12c8035435fa16e3f6b18049bb1d7815c00a7a58 (patch) | |
tree | 4777a85e7f4902bc37b1ace6d26e11d2ec43fb1b /arch/ia64/hp/sim | |
parent | 799be6ff2fd7294f428a9e68a7786490c862c1af (diff) |
TTY: amiserial/simserial, use count from tty_port
Nothing special. Just remove count from serial_state and change all
users to use tty_port.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/ia64/hp/sim')
-rw-r--r-- | arch/ia64/hp/sim/simserial.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index fb324b345e88..baa2b1ec00a0 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -500,26 +500,26 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
500 | return; | 500 | return; |
501 | } | 501 | } |
502 | #ifdef SIMSERIAL_DEBUG | 502 | #ifdef SIMSERIAL_DEBUG |
503 | printk("rs_close ttys%d, count = %d\n", info->line, info->count); | 503 | printk("rs_close ttys%d, count = %d\n", info->line, info->tport.count); |
504 | #endif | 504 | #endif |
505 | if ((tty->count == 1) && (info->count != 1)) { | 505 | if ((tty->count == 1) && (info->tport.count != 1)) { |
506 | /* | 506 | /* |
507 | * Uh, oh. tty->count is 1, which means that the tty | 507 | * Uh, oh. tty->count is 1, which means that the tty |
508 | * structure will be freed. info->count should always | 508 | * structure will be freed. info->tport.count should always |
509 | * be one in these conditions. If it's greater than | 509 | * be one in these conditions. If it's greater than |
510 | * one, we've got real problems, since it means the | 510 | * one, we've got real problems, since it means the |
511 | * serial port won't be shutdown. | 511 | * serial port won't be shutdown. |
512 | */ | 512 | */ |
513 | printk(KERN_ERR "rs_close: bad serial port count; tty->count is 1, " | 513 | printk(KERN_ERR "rs_close: bad serial port count; tty->count is 1, " |
514 | "info->count is %d\n", info->count); | 514 | "info->tport.count is %d\n", info->tport.count); |
515 | info->count = 1; | 515 | info->tport.count = 1; |
516 | } | 516 | } |
517 | if (--info->count < 0) { | 517 | if (--info->tport.count < 0) { |
518 | printk(KERN_ERR "rs_close: bad serial port count for ttys%d: %d\n", | 518 | printk(KERN_ERR "rs_close: bad serial port count for ttys%d: %d\n", |
519 | info->line, info->count); | 519 | info->line, info->tport.count); |
520 | info->count = 0; | 520 | info->tport.count = 0; |
521 | } | 521 | } |
522 | if (info->count) { | 522 | if (info->tport.count) { |
523 | local_irq_restore(flags); | 523 | local_irq_restore(flags); |
524 | return; | 524 | return; |
525 | } | 525 | } |
@@ -567,7 +567,7 @@ static void rs_hangup(struct tty_struct *tty) | |||
567 | return; | 567 | return; |
568 | shutdown(tty, info); | 568 | shutdown(tty, info); |
569 | 569 | ||
570 | info->count = 0; | 570 | info->tport.count = 0; |
571 | info->flags &= ~ASYNC_NORMAL_ACTIVE; | 571 | info->flags &= ~ASYNC_NORMAL_ACTIVE; |
572 | info->tport.tty = NULL; | 572 | info->tport.tty = NULL; |
573 | wake_up_interruptible(&info->tport.open_wait); | 573 | wake_up_interruptible(&info->tport.open_wait); |
@@ -661,13 +661,13 @@ static int rs_open(struct tty_struct *tty, struct file * filp) | |||
661 | int retval; | 661 | int retval; |
662 | unsigned long page; | 662 | unsigned long page; |
663 | 663 | ||
664 | info->count++; | 664 | info->tport.count++; |
665 | info->tport.tty = tty; | 665 | info->tport.tty = tty; |
666 | tty->driver_data = info; | 666 | tty->driver_data = info; |
667 | tty->port = &info->tport; | 667 | tty->port = &info->tport; |
668 | 668 | ||
669 | #ifdef SIMSERIAL_DEBUG | 669 | #ifdef SIMSERIAL_DEBUG |
670 | printk("rs_open %s, count = %d\n", tty->name, info->count); | 670 | printk("rs_open %s, count = %d\n", tty->name, info->tport.count); |
671 | #endif | 671 | #endif |
672 | tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0; | 672 | tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0; |
673 | 673 | ||