lkml.org 
[lkml]   [2019]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V7 2/4] USB: serial: f81232: fix interrupt worker not stop
Date
The F81232 will use LSR/Interrupt worker to handle LSR error & MSR
change. This patch will fix the interrupt work should stop in close()
and suspend().

Cc: Johan Hovold <johan@kernel.org>
Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
---
V7:
1: first introduce to this series patch.

drivers/usb/serial/f81232.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c
index 18d3fcf2907a..7c7495ae5600 100644
--- a/drivers/usb/serial/f81232.c
+++ b/drivers/usb/serial/f81232.c
@@ -576,6 +576,7 @@ static void f81232_close(struct usb_serial_port *port)
usb_serial_generic_close(port);
usb_kill_urb(port->interrupt_in_urb);
flush_work(&port_priv->lsr_work);
+ flush_work(&port_priv->interrupt_work);
port_priv->is_port_open = false;

mutex_unlock(&port_priv->lock);
@@ -679,8 +680,10 @@ static int f81232_suspend(struct usb_serial *serial, pm_message_t message)

usb_kill_urb(port->interrupt_in_urb);

- if (port_priv)
+ if (port_priv) {
flush_work(&port_priv->lsr_work);
+ flush_work(&port_priv->interrupt_work);
+ }

return 0;
}
--
2.7.4
\
 
 \ /
  Last update: 2019-04-16 10:28    [W:0.028 / U:10.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site