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 <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

vanhempi
6982a39842
commit
6aad04f213
@@ -814,7 +814,6 @@ static void mos7840_bulk_out_data_callback(struct urb *urb)
|
||||
{
|
||||
struct moschip_port *mos7840_port;
|
||||
struct usb_serial_port *port;
|
||||
struct tty_struct *tty;
|
||||
int status = urb->status;
|
||||
int i;
|
||||
|
||||
@@ -837,10 +836,8 @@ static void mos7840_bulk_out_data_callback(struct urb *urb)
|
||||
if (mos7840_port_paranoia_check(port, __func__))
|
||||
return;
|
||||
|
||||
tty = tty_port_tty_get(&port->port);
|
||||
if (tty && mos7840_port->open)
|
||||
tty_wakeup(tty);
|
||||
tty_kref_put(tty);
|
||||
if (mos7840_port->open)
|
||||
tty_port_tty_wakeup(&port->port);
|
||||
|
||||
}
|
||||
|
||||
|
Viittaa uudesa ongelmassa
Block a user