X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fchar%2Friscom8.c;h=b37e626f4faa69fa1f1afd81a5be9723b9381f17;hb=b589ee5943a9610ebaea6e4e3433f2ae4d812b0b;hp=e2a94bfb2a436dd5d24e68fb8388721351a6acdb;hpb=fb7665544dd60e016494cd5531f5b65ddae22ddc;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index e2a94bfb2a4..b37e626f4fa 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c @@ -213,14 +213,6 @@ static inline void rc_release_io_range(struct riscom_board * const bp) release_region(RC_TO_ISA(rc_ioport[i]) + bp->base, 1); } -/* Must be called with enabled interrupts */ -static inline void rc_long_delay(unsigned long delay) -{ - unsigned long i; - - for (i = jiffies + delay; time_after(i,jiffies); ) ; -} - /* Reset and setup CD180 chip */ static void __init rc_init_CD180(struct riscom_board const * bp) { @@ -231,7 +223,7 @@ static void __init rc_init_CD180(struct riscom_board const * bp) rc_wait_CCR(bp); /* Wait for CCR ready */ rc_out(bp, CD180_CCR, CCR_HARDRESET); /* Reset CD180 chip */ sti(); - rc_long_delay(HZ/20); /* Delay 0.05 sec */ + msleep(50); /* Delay 0.05 sec */ cli(); rc_out(bp, CD180_GIVR, RC_ID); /* Set ID for this chip */ rc_out(bp, CD180_GICR, 0); /* Clear all bits */ @@ -280,7 +272,7 @@ static int __init rc_probe(struct riscom_board *bp) rc_wait_CCR(bp); rc_out(bp, CD180_CCR, CCR_TXEN); /* Enable transmitter */ rc_out(bp, CD180_IER, IER_TXRDY); /* Enable tx empty intr */ - rc_long_delay(HZ/20); + msleep(50); irqs = probe_irq_off(irqs); val1 = rc_in(bp, RC_BSR); /* Get Board Status reg */ val2 = rc_in(bp, RC_ACK_TINT); /* ACK interrupt */ @@ -980,7 +972,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp, } schedule(); } - current->state = TASK_RUNNING; + __set_current_state(TASK_RUNNING); remove_wait_queue(&port->open_wait, &wait); if (!tty_hung_up_p(filp)) port->count++; @@ -1229,7 +1221,6 @@ static void rc_flush_buffer(struct tty_struct *tty) port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; restore_flags(flags); - wake_up_interruptible(&tty->write_wait); tty_wakeup(tty); } @@ -1570,10 +1561,8 @@ static void do_softint(struct work_struct *ugly_api) if(!(tty = port->tty)) return; - if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) { + if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) tty_wakeup(tty); - wake_up_interruptible(&tty->write_wait); - } } static const struct tty_operations riscom_ops = {