diff options
Diffstat (limited to 'drivers/tty/n_hdlc.c')
-rw-r--r-- | drivers/tty/n_hdlc.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c index cac666314aef..cea56033b34c 100644 --- a/drivers/tty/n_hdlc.c +++ b/drivers/tty/n_hdlc.c | |||
@@ -188,8 +188,8 @@ static unsigned int n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp, | |||
188 | poll_table *wait); | 188 | poll_table *wait); |
189 | static int n_hdlc_tty_open(struct tty_struct *tty); | 189 | static int n_hdlc_tty_open(struct tty_struct *tty); |
190 | static void n_hdlc_tty_close(struct tty_struct *tty); | 190 | static void n_hdlc_tty_close(struct tty_struct *tty); |
191 | static unsigned int n_hdlc_tty_receive(struct tty_struct *tty, | 191 | static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *cp, |
192 | const __u8 *cp, char *fp, int count); | 192 | char *fp, int count); |
193 | static void n_hdlc_tty_wakeup(struct tty_struct *tty); | 193 | static void n_hdlc_tty_wakeup(struct tty_struct *tty); |
194 | 194 | ||
195 | #define bset(p,b) ((p)[(b) >> 5] |= (1 << ((b) & 0x1f))) | 195 | #define bset(p,b) ((p)[(b) >> 5] |= (1 << ((b) & 0x1f))) |
@@ -509,8 +509,8 @@ static void n_hdlc_tty_wakeup(struct tty_struct *tty) | |||
509 | * Called by tty low level driver when receive data is available. Data is | 509 | * Called by tty low level driver when receive data is available. Data is |
510 | * interpreted as one HDLC frame. | 510 | * interpreted as one HDLC frame. |
511 | */ | 511 | */ |
512 | static unsigned int n_hdlc_tty_receive(struct tty_struct *tty, | 512 | static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data, |
513 | const __u8 *data, char *flags, int count) | 513 | char *flags, int count) |
514 | { | 514 | { |
515 | register struct n_hdlc *n_hdlc = tty2n_hdlc (tty); | 515 | register struct n_hdlc *n_hdlc = tty2n_hdlc (tty); |
516 | register struct n_hdlc_buf *buf; | 516 | register struct n_hdlc_buf *buf; |
@@ -521,20 +521,20 @@ static unsigned int n_hdlc_tty_receive(struct tty_struct *tty, | |||
521 | 521 | ||
522 | /* This can happen if stuff comes in on the backup tty */ | 522 | /* This can happen if stuff comes in on the backup tty */ |
523 | if (!n_hdlc || tty != n_hdlc->tty) | 523 | if (!n_hdlc || tty != n_hdlc->tty) |
524 | return -ENODEV; | 524 | return; |
525 | 525 | ||
526 | /* verify line is using HDLC discipline */ | 526 | /* verify line is using HDLC discipline */ |
527 | if (n_hdlc->magic != HDLC_MAGIC) { | 527 | if (n_hdlc->magic != HDLC_MAGIC) { |
528 | printk("%s(%d) line not using HDLC discipline\n", | 528 | printk("%s(%d) line not using HDLC discipline\n", |
529 | __FILE__,__LINE__); | 529 | __FILE__,__LINE__); |
530 | return -EINVAL; | 530 | return; |
531 | } | 531 | } |
532 | 532 | ||
533 | if ( count>maxframe ) { | 533 | if ( count>maxframe ) { |
534 | if (debuglevel >= DEBUG_LEVEL_INFO) | 534 | if (debuglevel >= DEBUG_LEVEL_INFO) |
535 | printk("%s(%d) rx count>maxframesize, data discarded\n", | 535 | printk("%s(%d) rx count>maxframesize, data discarded\n", |
536 | __FILE__,__LINE__); | 536 | __FILE__,__LINE__); |
537 | return -EINVAL; | 537 | return; |
538 | } | 538 | } |
539 | 539 | ||
540 | /* get a free HDLC buffer */ | 540 | /* get a free HDLC buffer */ |
@@ -550,7 +550,7 @@ static unsigned int n_hdlc_tty_receive(struct tty_struct *tty, | |||
550 | if (debuglevel >= DEBUG_LEVEL_INFO) | 550 | if (debuglevel >= DEBUG_LEVEL_INFO) |
551 | printk("%s(%d) no more rx buffers, data discarded\n", | 551 | printk("%s(%d) no more rx buffers, data discarded\n", |
552 | __FILE__,__LINE__); | 552 | __FILE__,__LINE__); |
553 | return -EINVAL; | 553 | return; |
554 | } | 554 | } |
555 | 555 | ||
556 | /* copy received data to HDLC buffer */ | 556 | /* copy received data to HDLC buffer */ |
@@ -565,8 +565,6 @@ static unsigned int n_hdlc_tty_receive(struct tty_struct *tty, | |||
565 | if (n_hdlc->tty->fasync != NULL) | 565 | if (n_hdlc->tty->fasync != NULL) |
566 | kill_fasync (&n_hdlc->tty->fasync, SIGIO, POLL_IN); | 566 | kill_fasync (&n_hdlc->tty->fasync, SIGIO, POLL_IN); |
567 | 567 | ||
568 | return count; | ||
569 | |||
570 | } /* end of n_hdlc_tty_receive() */ | 568 | } /* end of n_hdlc_tty_receive() */ |
571 | 569 | ||
572 | /** | 570 | /** |