]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/epca.c
epca: Add infinite break support
[linux-2.6-omap-h63xx.git] / drivers / char / epca.c
index 456e4ede049f2a0dad2bd0452199461272f1c353..cf2461d34e5fc17d56ca16e5e165a092bd0b6136 100644 (file)
@@ -1376,6 +1376,7 @@ static void post_fep_init(unsigned int crd)
                unsigned long flags;
                u16 tseg, rseg;
 
+               tty_port_init(&ch->port);
                ch->brdchan = bc;
                ch->mailbox = gd;
                INIT_WORK(&ch->tqueue, do_softint);
@@ -1510,10 +1511,6 @@ static void post_fep_init(unsigned int crd)
                ch->fepstopca = 0;
 
                ch->close_delay = 50;
-               ch->port.count = 0;
-               ch->port.blocked_open = 0;
-               init_waitqueue_head(&ch->port.open_wait);
-               init_waitqueue_head(&ch->port.close_wait);
 
                spin_unlock_irqrestore(&epca_lock, flags);
        }
@@ -2480,7 +2477,11 @@ static int pc_send_break(struct tty_struct *tty, int msec)
        unsigned long flags;
 
        if (msec == -1)
-               return -EOPNOTSUPP;
+               msec = 0xFFFF;
+       else if (msec > 0xFFFE)
+               msec = 0xFFFE;
+       else if (msec < 1)
+               msec = 1;
 
        spin_lock_irqsave(&epca_lock, flags);
        globalwinon(ch);