diff options
Diffstat (limited to 'drivers/char/vme_scc.c')
-rw-r--r-- | drivers/char/vme_scc.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c index 19ba83635dd7..d9325281e482 100644 --- a/drivers/char/vme_scc.c +++ b/drivers/char/vme_scc.c | |||
@@ -434,13 +434,7 @@ static irqreturn_t scc_rx_int(int irq, void *data, struct pt_regs *fp) | |||
434 | SCCwrite_NB(COMMAND_REG, CR_HIGHEST_IUS_RESET); | 434 | SCCwrite_NB(COMMAND_REG, CR_HIGHEST_IUS_RESET); |
435 | return IRQ_HANDLED; | 435 | return IRQ_HANDLED; |
436 | } | 436 | } |
437 | if (tty->flip.count < TTY_FLIPBUF_SIZE) { | 437 | tty_insert_flip_char(tty, ch, 0); |
438 | *tty->flip.char_buf_ptr = ch; | ||
439 | *tty->flip.flag_buf_ptr = 0; | ||
440 | tty->flip.flag_buf_ptr++; | ||
441 | tty->flip.char_buf_ptr++; | ||
442 | tty->flip.count++; | ||
443 | } | ||
444 | 438 | ||
445 | /* Check if another character is already ready; in that case, the | 439 | /* Check if another character is already ready; in that case, the |
446 | * spcond_int() function must be used, because this character may have an | 440 | * spcond_int() function must be used, because this character may have an |
@@ -487,13 +481,7 @@ static irqreturn_t scc_spcond_int(int irq, void *data, struct pt_regs *fp) | |||
487 | else | 481 | else |
488 | err = 0; | 482 | err = 0; |
489 | 483 | ||
490 | if (tty->flip.count < TTY_FLIPBUF_SIZE) { | 484 | tty_insert_flip_char(tty, ch, err); |
491 | *tty->flip.char_buf_ptr = ch; | ||
492 | *tty->flip.flag_buf_ptr = err; | ||
493 | tty->flip.flag_buf_ptr++; | ||
494 | tty->flip.char_buf_ptr++; | ||
495 | tty->flip.count++; | ||
496 | } | ||
497 | 485 | ||
498 | /* ++TeSche: *All* errors have to be cleared manually, | 486 | /* ++TeSche: *All* errors have to be cleared manually, |
499 | * else the condition persists for the next chars | 487 | * else the condition persists for the next chars |
@@ -875,13 +863,13 @@ static int scc_open (struct tty_struct * tty, struct file * filp) | |||
875 | local_irq_save(flags); | 863 | local_irq_save(flags); |
876 | #if defined(CONFIG_MVME147_SCC) || defined(CONFIG_MVME162_SCC) | 864 | #if defined(CONFIG_MVME147_SCC) || defined(CONFIG_MVME162_SCC) |
877 | if (MACH_IS_MVME147 || MACH_IS_MVME16x) { | 865 | if (MACH_IS_MVME147 || MACH_IS_MVME16x) { |
878 | for (i=0; i<sizeof(mvme_init_tab)/sizeof(*mvme_init_tab); ++i) | 866 | for (i = 0; i < ARRAY_SIZE(mvme_init_tab); ++i) |
879 | SCCwrite(mvme_init_tab[i].reg, mvme_init_tab[i].val); | 867 | SCCwrite(mvme_init_tab[i].reg, mvme_init_tab[i].val); |
880 | } | 868 | } |
881 | #endif | 869 | #endif |
882 | #if defined(CONFIG_BVME6000_SCC) | 870 | #if defined(CONFIG_BVME6000_SCC) |
883 | if (MACH_IS_BVME6000) { | 871 | if (MACH_IS_BVME6000) { |
884 | for (i=0; i<sizeof(bvme_init_tab)/sizeof(*bvme_init_tab); ++i) | 872 | for (i = 0; i < ARRAY_SIZE(bvme_init_tab); ++i) |
885 | SCCwrite(bvme_init_tab[i].reg, bvme_init_tab[i].val); | 873 | SCCwrite(bvme_init_tab[i].reg, bvme_init_tab[i].val); |
886 | } | 874 | } |
887 | #endif | 875 | #endif |