Thread (9 messages) read the whole thread 9 messages, 3 authors, 2021-06-07
STALE1882d LANDED

Landed in mainline as 024236abeba8 on 2021-06-04.

[PATCH 3/3] usb: typec: tcpm: cancel send discover hrtimer when unregister tcpm port

From: Li Jun <hidden>
Date: 2021-06-02 10:14:57
Subsystem: the rest, usb subsystem, usb typec class, usb typec port controller drivers · Maintainers: Linus Torvalds, Greg Kroah-Hartman, Heikki Krogerus, Badhri Jagan Sridharan

Like the state_machine_timer, we should also cancel possible pending
send discover identity hrtimer when unregister tcpm port.

Fixes: c34e85fa69b9 ("usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work")
Signed-off-by: Li Jun <redacted>
---
 drivers/usb/typec/tcpm/tcpm.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index c7460df2119d..2899c9de6d20 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -6328,6 +6328,7 @@ void tcpm_unregister_port(struct tcpm_port *port)
 {
 	int i;
 
+	hrtimer_cancel(&port->send_discover_timer);
 	hrtimer_cancel(&port->enable_frs_timer);
 	hrtimer_cancel(&port->vdm_state_machine_timer);
 	hrtimer_cancel(&port->state_machine_timer);
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help