X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fvme_scc.c;fp=drivers%2Fchar%2Fvme_scc.c;h=fd00822ac145ea50f224321874a107d67cfb670c;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=19ba83635dd75d6433cf32c521ed929b679eec33;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c index 19ba83635..fd00822ac 100644 --- a/drivers/char/vme_scc.c +++ b/drivers/char/vme_scc.c @@ -184,7 +184,7 @@ static void scc_init_portstructs(void) port->gs.closing_wait = 30 * HZ; port->gs.rd = &scc_real_driver; #ifdef NEW_WRITE_LOCKING - port->gs.port_write_sem = MUTEX; + port->gs.port_write_mutex = MUTEX; #endif init_waitqueue_head(&port->gs.open_wait); init_waitqueue_head(&port->gs.close_wait); @@ -434,13 +434,7 @@ static irqreturn_t scc_rx_int(int irq, void *data, struct pt_regs *fp) SCCwrite_NB(COMMAND_REG, CR_HIGHEST_IUS_RESET); return IRQ_HANDLED; } - if (tty->flip.count < TTY_FLIPBUF_SIZE) { - *tty->flip.char_buf_ptr = ch; - *tty->flip.flag_buf_ptr = 0; - tty->flip.flag_buf_ptr++; - tty->flip.char_buf_ptr++; - tty->flip.count++; - } + tty_insert_flip_char(tty, ch, 0); /* Check if another character is already ready; in that case, the * 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) else err = 0; - if (tty->flip.count < TTY_FLIPBUF_SIZE) { - *tty->flip.char_buf_ptr = ch; - *tty->flip.flag_buf_ptr = err; - tty->flip.flag_buf_ptr++; - tty->flip.char_buf_ptr++; - tty->flip.count++; - } + tty_insert_flip_char(tty, ch, err); /* ++TeSche: *All* errors have to be cleared manually, * else the condition persists for the next chars @@ -875,13 +863,13 @@ static int scc_open (struct tty_struct * tty, struct file * filp) local_irq_save(flags); #if defined(CONFIG_MVME147_SCC) || defined(CONFIG_MVME162_SCC) if (MACH_IS_MVME147 || MACH_IS_MVME16x) { - for (i=0; i