diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-04-02 07:54:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-09 15:04:30 -0400 |
commit | 3d5ea59d35b21d3bc582ce06bf22b522c8764003 (patch) | |
tree | 67f9394dceaef425d4595e6e0f8fb5b4b1fc15f6 /drivers/usb | |
parent | 35f95fd7f234d2b58803bab6f6ebd6bb988050a2 (diff) |
TTY: usb/u_serial use close_wait from tty_port
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/u_serial.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c index d038a9032214..71ecae743cd2 100644 --- a/drivers/usb/gadget/u_serial.c +++ b/drivers/usb/gadget/u_serial.c | |||
@@ -102,8 +102,6 @@ struct gs_port { | |||
102 | bool openclose; /* open/close in progress */ | 102 | bool openclose; /* open/close in progress */ |
103 | u8 port_num; | 103 | u8 port_num; |
104 | 104 | ||
105 | wait_queue_head_t close_wait; /* wait for last close */ | ||
106 | |||
107 | struct list_head read_pool; | 105 | struct list_head read_pool; |
108 | int read_started; | 106 | int read_started; |
109 | int read_allocated; | 107 | int read_allocated; |
@@ -885,7 +883,7 @@ static void gs_close(struct tty_struct *tty, struct file *file) | |||
885 | pr_debug("gs_close: ttyGS%d (%p,%p) done!\n", | 883 | pr_debug("gs_close: ttyGS%d (%p,%p) done!\n", |
886 | port->port_num, tty, file); | 884 | port->port_num, tty, file); |
887 | 885 | ||
888 | wake_up_interruptible(&port->close_wait); | 886 | wake_up_interruptible(&port->port.close_wait); |
889 | exit: | 887 | exit: |
890 | spin_unlock_irq(&port->port_lock); | 888 | spin_unlock_irq(&port->port_lock); |
891 | } | 889 | } |
@@ -1035,7 +1033,6 @@ gs_port_alloc(unsigned port_num, struct usb_cdc_line_coding *coding) | |||
1035 | 1033 | ||
1036 | tty_port_init(&port->port); | 1034 | tty_port_init(&port->port); |
1037 | spin_lock_init(&port->port_lock); | 1035 | spin_lock_init(&port->port_lock); |
1038 | init_waitqueue_head(&port->close_wait); | ||
1039 | init_waitqueue_head(&port->drain_wait); | 1036 | init_waitqueue_head(&port->drain_wait); |
1040 | 1037 | ||
1041 | tasklet_init(&port->push, gs_rx_push, (unsigned long) port); | 1038 | tasklet_init(&port->push, gs_rx_push, (unsigned long) port); |
@@ -1194,7 +1191,7 @@ void gserial_cleanup(void) | |||
1194 | tasklet_kill(&port->push); | 1191 | tasklet_kill(&port->push); |
1195 | 1192 | ||
1196 | /* wait for old opens to finish */ | 1193 | /* wait for old opens to finish */ |
1197 | wait_event(port->close_wait, gs_closed(port)); | 1194 | wait_event(port->port.close_wait, gs_closed(port)); |
1198 | 1195 | ||
1199 | WARN_ON(port->port_usb != NULL); | 1196 | WARN_ON(port->port_usb != NULL); |
1200 | 1197 | ||