diff options
author | Nicholas Mc Guire <der.herr@hofr.at> | 2014-12-31 03:59:46 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-01-10 11:43:26 +0000 |
commit | f2229ab8611e6e79992b6357db3fb4faf70e74a9 (patch) | |
tree | a4230591e1269fc738b421df52c8b93e109f2016 | |
parent | 94e65519abde01cbffb9c538a4598f6a50bc86d1 (diff) | |
download | linux-f2229ab8611e6e79992b6357db3fb4faf70e74a9.tar.gz linux-f2229ab8611e6e79992b6357db3fb4faf70e74a9.tar.bz2 linux-f2229ab8611e6e79992b6357db3fb4faf70e74a9.zip |
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: Nicholas Mc Guire <der.herr@hofr.at>
Acked-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/adc/qcom-spmi-iadc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/adc/qcom-spmi-iadc.c b/drivers/iio/adc/qcom-spmi-iadc.c index b9666f2f5e51..fabd24edc2a1 100644 --- a/drivers/iio/adc/qcom-spmi-iadc.c +++ b/drivers/iio/adc/qcom-spmi-iadc.c @@ -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 |