提交 9578bcd0 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

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: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ecc443c0
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册