diff mbox series

[SRU,OEM-B,03/10] serdev: ttyport: do not used keyed wakeup in write_wakeup

Message ID 20180507105639.24211-4-shrirang.bagul@canonical.com
State Accepted
Headers show
Series Support Intel Atom (Baytrail-I) HS-UART serdev slaves over tty | expand

Commit Message

Shrirang Bagul May 7, 2018, 10:56 a.m. UTC
From: Johan Hovold <johan@kernel.org>

BugLink: http://bugs.launchpad.net/bugs/1769610

Serdev does not use the file abstraction and specifically there will
never be anyone polling a file descriptor for POLLOUT events.

Just use plain wake_up_interruptible() in the write_wakeup callback and
document why it's there.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit afe3eb60fa82a5d812378530b50755f58acc029c)
Signed-off-by: Shrirang Bagul <shrirang.bagul@canonical.com>
---
 drivers/tty/serdev/serdev-ttyport.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c
index c2629ab1bbcf..a5abb05be67d 100644
--- a/drivers/tty/serdev/serdev-ttyport.c
+++ b/drivers/tty/serdev/serdev-ttyport.c
@@ -59,7 +59,8 @@  static void ttyport_write_wakeup(struct tty_port *port)
 	    test_bit(SERPORT_ACTIVE, &serport->flags))
 		serdev_controller_write_wakeup(ctrl);
 
-	wake_up_interruptible_poll(&tty->write_wait, POLLOUT);
+	/* Wake up any tty_wait_until_sent() */
+	wake_up_interruptible(&tty->write_wait);
 
 	tty_kref_put(tty);
 }