diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-06-07 16:17:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-06-25 21:39:12 +0800 |
commit | 9578bcd0bb487b8ecef4b7eee799aafb678aa441 (patch) | |
tree | d7970527b57bb886510e98ec5544f02e48577ad6 /drivers/usb/typec | |
parent | ecc443c03fb14abfb8a6af5e3b2d43b5257e60f2 (diff) | |
download | linux-9578bcd0bb487b8ecef4b7eee799aafb678aa441.tar.bz2 |
typec: tcpm: Fix a msecs vs jiffies bug
The tcpm_set_state() function take msecs not jiffies.
Fixes: f0690a25a140 ("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>
Diffstat (limited to 'drivers/usb/typec')
-rw-r--r-- | drivers/usb/typec/tcpm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 8a201dd53d36..0dfd755020f4 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -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); |