mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
TTY: add tty_port_tty_wakeup helper
It allows for cleaning up on a considerable amount of places. They did port_get, wakeup, kref_put. Now the only thing needed is to call tty_port_tty_wakeup which does exactly that. One exception is ifx6x60 where tty_wakeup was open-coded. We now call tty_wakeup properly there. Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
6982a39842
commit
6aad04f213
22 changed files with 51 additions and 176 deletions
|
|
@ -248,7 +248,6 @@ static irqreturn_t line_write_interrupt(int irq, void *data)
|
|||
{
|
||||
struct chan *chan = data;
|
||||
struct line *line = chan->line;
|
||||
struct tty_struct *tty;
|
||||
int err;
|
||||
|
||||
/*
|
||||
|
|
@ -267,12 +266,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data)
|
|||
}
|
||||
spin_unlock(&line->lock);
|
||||
|
||||
tty = tty_port_tty_get(&line->port);
|
||||
if (tty == NULL)
|
||||
return IRQ_NONE;
|
||||
|
||||
tty_wakeup(tty);
|
||||
tty_kref_put(tty);
|
||||
tty_port_tty_wakeup(&line->port);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue