aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jun <[email protected]>2021-06-02 17:57:09 +0800
committerGreg Kroah-Hartman <[email protected]>2021-06-04 13:28:01 +0200
commit024236abeba8194c23affedaaa8b1aee7b943890 (patch)
tree206fe05635b29f30c610dbd98bbafa35f43e04cf
parent7ade4805e296c8d1e40c842395bbe478c7210555 (diff)
usb: typec: tcpm: cancel send discover hrtimer when unregister tcpm port
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") Reviewed-by: Guenter Roeck <[email protected]> Cc: stable <[email protected]> Signed-off-by: Li Jun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/usb/typec/tcpm/tcpm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index a1382e878127..a7c336f56849 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -6335,6 +6335,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);