diff options
author | Won Kang <wkang77@gmail.com> | 2013-08-16 04:13:44 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-19 22:30:59 (GMT) |
commit | bf0373f1c61dd0e0356aeed4e51786e052bb4de8 (patch) | |
tree | 26b625071c28bbf76d96f614b23d32550f49cf87 /drivers/staging/gdm724x/gdm_mux.c | |
parent | 7ee4c1b94958837015f8b8a1db6101810c211a8c (diff) | |
download | linux-fsl-qoriq-bf0373f1c61dd0e0356aeed4e51786e052bb4de8.tar.xz |
staging: gdm7240: a TTY rewrite according to the latest TTY APIs
Fixed mis-use of mutex for gdm_table. gdm_table is refered to only
inside tty_install and port destrcut, and usb callbacks use internal
reference which was saved during urb submission
Signed-off-by: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gdm724x/gdm_mux.c')
-rw-r--r-- | drivers/staging/gdm724x/gdm_mux.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/gdm724x/gdm_mux.c b/drivers/staging/gdm724x/gdm_mux.c index b630bab..9e217ff 100644 --- a/drivers/staging/gdm724x/gdm_mux.c +++ b/drivers/staging/gdm724x/gdm_mux.c @@ -25,7 +25,6 @@ #include <linux/usb/cdc.h> #include "gdm_mux.h" -#include "gdm_tty.h" struct workqueue_struct *mux_rx_wq; @@ -196,7 +195,7 @@ static int up_to_host(struct mux_rx *r) ret = r->callback(mux_header->data, payload_size, index, - mux_dev->minor[index], + mux_dev->tty_dev, RECV_PACKET_PROCESS_CONTINUE ); if (ret == TO_HOST_BUFFER_REQUEST_FAIL) { @@ -209,7 +208,7 @@ static int up_to_host(struct mux_rx *r) ret = r->callback(NULL, 0, index, - mux_dev->minor[index], + mux_dev->tty_dev, RECV_PACKET_PROCESS_COMPLETE ); break; @@ -283,7 +282,7 @@ static void gdm_mux_rcv_complete(struct urb *urb) } static int gdm_mux_recv(void *priv_dev, - int (*cb)(void *data, int len, int tty_index, int minor, int complete) + int (*cb)(void *data, int len, int tty_index, struct tty_dev *tty_dev, int complete) ) { struct mux_dev *mux_dev = priv_dev; @@ -562,7 +561,7 @@ static int gdm_mux_probe(struct usb_interface *intf, const struct usb_device_id goto out; } for (i = 0; i < TTY_MAX_COUNT; i++) - mux_dev->minor[i] = tty_dev->minor[i]; + mux_dev->tty_dev = tty_dev; out: if (ret < 0) { |