mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
typec: tcpm: Fix a msecs vs jiffies bug
[ Upstream commit9578bcd0bb] The tcpm_set_state() function take msecs not jiffies. Fixes:f0690a25a1("staging: typec: USB Type-C Port Manager (tcpm)") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d341ce9a63
commit
5a64e0870c
@@ -2479,7 +2479,8 @@ static void run_state_machine(struct tcpm_port *port)
|
||||
tcpm_port_is_sink(port) &&
|
||||
time_is_after_jiffies(port->delayed_runtime)) {
|
||||
tcpm_set_state(port, SNK_DISCOVERY,
|
||||
port->delayed_runtime - jiffies);
|
||||
jiffies_to_msecs(port->delayed_runtime -
|
||||
jiffies));
|
||||
break;
|
||||
}
|
||||
tcpm_set_state(port, unattached_state(port), 0);
|
||||
|
||||
Reference in New Issue
Block a user