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

Commit f2229ab8 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Jonathan Cameron
Browse files

iio: iadc: wait_for_completion_timeout time in jiffies



The timeout value to wait_for_completion_timeout is in jiffies but
the value being passed seems like it was intended to by microseconds
Note that the timeout was extremely long thus it might be too short
now. In any case it probably should be passed through usecs_to_jiffies()
or msecs_to_jiffies()

patch is against linux-next 3.19.0-rc1 -next-20141226

patch was only compile-tested x86_64_defcofnig + CONFIG_SPMI=m
CONFIG_IIO=m, CONFIG_QCOM_SPMI_IADC=m

Signed-off-by: default avatarNicholas Mc Guire <der.herr@hofr.at>
Acked-by: default avatarIvan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 94e65519
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -296,7 +296,8 @@ static int iadc_do_conversion(struct iadc_chip *iadc, int chan, u16 *data)
	if (iadc->poll_eoc) {
		ret = iadc_poll_wait_eoc(iadc, wait);
	} else {
		ret = wait_for_completion_timeout(&iadc->complete, wait);
		ret = wait_for_completion_timeout(&iadc->complete,
			usecs_to_jiffies(wait));
		if (!ret)
			ret = -ETIMEDOUT;
		else