aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/capi/capi.c2
-rw-r--r--drivers/isdn/gigaset/ser-gigaset.c27
2 files changed, 13 insertions, 16 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 871b0cbca5e4..798d7f3e42ef 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1231,7 +1231,7 @@ static int capinc_tty_ioctl(struct tty_struct *tty, struct file * file,
1231 int error = 0; 1231 int error = 0;
1232 switch (cmd) { 1232 switch (cmd) {
1233 default: 1233 default:
1234 error = n_tty_ioctl (tty, file, cmd, arg); 1234 error = n_tty_ioctl_helper(tty, file, cmd, arg);
1235 break; 1235 break;
1236 } 1236 }
1237 return error; 1237 return error;
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c
index 5e89fa177816..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(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(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 */
684static unsigned int 681static unsigned int
685gigaset_tty_poll(struct tty_struct *tty, struct file *file, poll_table *wait) 682gigaset_tty_poll(struct tty_struct *tty, struct file *file, poll_table *wait)