Skip to content

Commit

Permalink
usb: gadget: u_serial: fix switch off blocked
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Haipeng YU authored and Felipe Balbi committed Dec 13, 2012
1 parent 5dbd693 commit 484ca3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/u_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 484ca3a

Please sign in to comment.