diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-03-07 07:12:29 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-18 19:19:45 -0400 |
commit | 6aad04f21374633bd8cecf25024553d1e11a9522 (patch) | |
tree | 9e3351e53b68d158b436a737049cbe2ee01ff126 /drivers/usb/serial/mos7720.c | |
parent | 6982a398426a22166eaf049b79544536fdd6429f (diff) |
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>
Diffstat (limited to 'drivers/usb/serial/mos7720.c')
-rw-r--r-- | drivers/usb/serial/mos7720.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index e0ebec3b5d6a..e956eae198fd 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c | |||
@@ -932,7 +932,6 @@ static void mos7720_bulk_in_callback(struct urb *urb) | |||
932 | static void mos7720_bulk_out_data_callback(struct urb *urb) | 932 | static void mos7720_bulk_out_data_callback(struct urb *urb) |
933 | { | 933 | { |
934 | struct moschip_port *mos7720_port; | 934 | struct moschip_port *mos7720_port; |
935 | struct tty_struct *tty; | ||
936 | int status = urb->status; | 935 | int status = urb->status; |
937 | 936 | ||
938 | if (status) { | 937 | if (status) { |
@@ -946,11 +945,8 @@ static void mos7720_bulk_out_data_callback(struct urb *urb) | |||
946 | return ; | 945 | return ; |
947 | } | 946 | } |
948 | 947 | ||
949 | tty = tty_port_tty_get(&mos7720_port->port->port); | 948 | if (mos7720_port->open) |
950 | 949 | tty_port_tty_wakeup(&mos7720_port->port->port); | |
951 | if (tty && mos7720_port->open) | ||
952 | tty_wakeup(tty); | ||
953 | tty_kref_put(tty); | ||
954 | } | 950 | } |
955 | 951 | ||
956 | /* | 952 | /* |