Skip to content

Commit

Permalink
typec: tcpm: Fix a msecs vs jiffies bug
Browse files Browse the repository at this point in the history
The tcpm_set_state() function take msecs not jiffies.

Fixes: f0690a2 ("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>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Jun 25, 2018
1 parent ecc443c commit 9578bcd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/typec/tcpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9578bcd

Please sign in to comment.