Skip to content

Commit

Permalink
usb: typec: tcpm: cancel send discover hrtimer when unregister tcpm port
Browse files Browse the repository at this point in the history
Like the state_machine_timer, we should also cancel possible pending
send discover identity hrtimer when unregister tcpm port.

Fixes: c34e85f ("usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work")
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Li Jun <jun.li@nxp.com>
Link: https://lore.kernel.org/r/1622627829-11070-3-git-send-email-jun.li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Li Jun authored and Greg Kroah-Hartman committed Jun 4, 2021
1 parent 7ade480 commit 024236a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/typec/tcpm/tcpm.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 024236a

Please sign in to comment.