diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2015-03-16 11:20:49 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2015-03-26 14:20:18 +0000 |
commit | 48579a9ae8d2034215d15912c863be36166696ed (patch) | |
tree | bfa697d57411cbe9c6e4a336e2a0553591319f91 | |
parent | 1422731dbc14063fc7083cb090108c0d95267361 (diff) | |
download | talos-obmc-linux-48579a9ae8d2034215d15912c863be36166696ed.tar.gz talos-obmc-linux-48579a9ae8d2034215d15912c863be36166696ed.zip |
mfd: dln2: Use msecs_to_jiffies for time conversion
Converting milliseconds to jiffies by "val * HZ / 1000" is technically
OK but msecs_to_jiffies(val) is the cleaner solution and handles all
corner cases correctly. This is a minor API consolidation only and
should make things more readable.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/dln2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/dln2.c b/drivers/mfd/dln2.c index 1be9bd1c046d..704e189ca162 100644 --- a/drivers/mfd/dln2.c +++ b/drivers/mfd/dln2.c @@ -435,7 +435,7 @@ static int _dln2_transfer(struct dln2_dev *dln2, u16 handle, u16 cmd, struct dln2_response *rsp; struct dln2_rx_context *rxc; struct device *dev = &dln2->interface->dev; - const unsigned long timeout = DLN2_USB_TIMEOUT * HZ / 1000; + const unsigned long timeout = msecs_to_jiffies(DLN2_USB_TIMEOUT); struct dln2_mod_rx_slots *rxs = &dln2->mod_rx_slots[handle]; int size; |