UPSTREAM: usb: typec: tcpm: cancel frs hrtimer when unregister tcpm port

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

Change-Id: I9a651304c9a3c0be8475773c119d000b5cddfa0f
Fixes: 8dc4bd0736 ("usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS)")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Li Jun <jun.li@nxp.com>
Link: https://lore.kernel.org/r/1622627829-11070-2-git-send-email-jun.li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
(cherry picked from commit 7ade4805e2)
This commit is contained in:
Li Jun
2021-06-02 17:57:08 +08:00
committed by Tao Huang
parent 8dd1e02217
commit 60612bbd90

View File

@@ -5191,6 +5191,7 @@ void tcpm_unregister_port(struct tcpm_port *port)
{
int i;
hrtimer_cancel(&port->enable_frs_timer);
hrtimer_cancel(&port->vdm_state_machine_timer);
hrtimer_cancel(&port->state_machine_timer);