Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9578bcd0 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

typec: tcpm: Fix a msecs vs jiffies bug



The tcpm_set_state() function take msecs not jiffies.

Fixes: f0690a25 ("staging: typec: USB Type-C Port Manager (tcpm)")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ecc443c0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3043,7 +3043,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);