diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/isdn/gigaset/ser-gigaset.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c index cc4f4e44ffe4..07052ed2a0c5 100644 --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c | |||
@@ -571,6 +571,7 @@ gigaset_tty_close(struct tty_struct *tty) | |||
571 | } | 571 | } |
572 | 572 | ||
573 | /* prevent other callers from entering ldisc methods */ | 573 | /* prevent other callers from entering ldisc methods */ |
574 | /* FIXME: should use the tty state flags */ | ||
574 | tty->disc_data = NULL; | 575 | tty->disc_data = NULL; |
575 | 576 | ||
576 | if (!cs->hw.ser) | 577 | if (!cs->hw.ser) |
@@ -642,10 +643,11 @@ gigaset_tty_ioctl(struct tty_struct *tty, struct file *file, | |||
642 | return -ENXIO; | 643 | return -ENXIO; |
643 | 644 | ||
644 | switch (cmd) { | 645 | switch (cmd) { |
645 | case TCGETS: | 646 | |
646 | case TCGETA: | 647 | case FIONREAD: |
647 | /* pass through to underlying serial device */ | 648 | /* unused, always return zero */ |
648 | rc = n_tty_ioctl_helper(tty, file, cmd, arg); | 649 | val = 0; |
650 | rc = put_user(val, p); | ||
649 | break; | 651 | break; |
650 | 652 | ||
651 | case TCFLSH: | 653 | case TCFLSH: |
@@ -659,20 +661,13 @@ gigaset_tty_ioctl(struct tty_struct *tty, struct file *file, | |||
659 | flush_send_queue(cs); | 661 | flush_send_queue(cs); |
660 | break; | 662 | break; |
661 | } | 663 | } |
662 | /* flush the serial port's buffer */ | 664 | /* Pass through */ |
663 | rc = n_tty_ioctl_helper(tty, file, cmd, arg); | ||
664 | break; | ||
665 | |||
666 | case FIONREAD: | ||
667 | /* unused, always return zero */ | ||
668 | val = 0; | ||
669 | rc = put_user(val, p); | ||
670 | break; | ||
671 | 665 | ||
672 | default: | 666 | default: |
673 | rc = -ENOIOCTLCMD; | 667 | /* pass through to underlying serial device */ |
668 | rc = n_tty_ioctl_helper(tty, file, cmd, arg); | ||
669 | break; | ||
674 | } | 670 | } |
675 | |||
676 | cs_put(cs); | 671 | cs_put(cs); |
677 | return rc; | 672 | return rc; |
678 | } | 673 | } |
@@ -680,6 +675,8 @@ gigaset_tty_ioctl(struct tty_struct *tty, struct file *file, | |||
680 | /* | 675 | /* |
681 | * Poll on the tty. | 676 | * Poll on the tty. |
682 | * Unused, always return zero. | 677 | * Unused, always return zero. |
678 | * | ||
679 | * FIXME: should probably return an exception - especially on hangup | ||
683 | */ | 680 | */ |
684 | static unsigned int | 681 | static unsigned int |
685 | gigaset_tty_poll(struct tty_struct *tty, struct file *file, poll_table *wait) | 682 | gigaset_tty_poll(struct tty_struct *tty, struct file *file, poll_table *wait) |