diff mbox

usb: gadget: fix switch off blocked in u_serial

Message ID 1352904001-24014-1-git-send-email-linus.walleij@stericsson.com
State Accepted
Commit 484ca3a35b43a5127f0ef8e8c816f1b2ab6ce323
Headers show

Commit Message

Linus Walleij Nov. 14, 2012, 2:40 p.m. UTC
From: Haipeng YU <haipeng.yu@stericsson.com>

When a device is switched off by software, gserial_cleanup will
be called, and switch off will be blocked in this function
because wake_up_interruptible() in gs_close() can not wake_up
the wait_event() in gserial_cleanup(), it should be changed to
wake_up() to match the wait_event().

Signed-off-by: Haipeng YU <haipeng.yu@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/usb/gadget/u_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index f173952..2d074ba 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -887,7 +887,7 @@  static void gs_close(struct tty_struct *tty, struct file *file)
 	pr_debug("gs_close: ttyGS%d (%p,%p) done!\n",
 			port->port_num, tty, file);
 
-	wake_up_interruptible(&port->port.close_wait);
+	wake_up(&port->port.close_wait);
 exit:
 	spin_unlock_irq(&port->port_lock);
 }