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

Commit 48579a9a authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Lee Jones
Browse files

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: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 1422731d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;