diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2015-02-02 03:35:20 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-02-04 12:00:33 -0500 |
commit | ee3ac290e8aaa8396e697a11470703e616ab335f (patch) | |
tree | 80ad9c9350eeaeee3931beb66b464884e21b0987 | |
parent | a36385a2613c0755164ec53e8b7a42d4d11f65b9 (diff) |
iio: vf610_adc: cleanup wait_for_completion return handling
return type of wait_for_completion_timeout is unsigned long not int, this
patch only fixes up the return handling.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/adc/vf610_adc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c index 8ec353c01d98..5b72d170fd36 100644 --- a/drivers/iio/adc/vf610_adc.c +++ b/drivers/iio/adc/vf610_adc.c | |||
@@ -259,7 +259,6 @@ static void vf610_adc_cfg_post_set(struct vf610_adc *info) | |||
259 | static void vf610_adc_calibration(struct vf610_adc *info) | 259 | static void vf610_adc_calibration(struct vf610_adc *info) |
260 | { | 260 | { |
261 | int adc_gc, hc_cfg; | 261 | int adc_gc, hc_cfg; |
262 | int timeout; | ||
263 | 262 | ||
264 | if (!info->adc_feature.calibration) | 263 | if (!info->adc_feature.calibration) |
265 | return; | 264 | return; |
@@ -271,9 +270,7 @@ static void vf610_adc_calibration(struct vf610_adc *info) | |||
271 | adc_gc = readl(info->regs + VF610_REG_ADC_GC); | 270 | adc_gc = readl(info->regs + VF610_REG_ADC_GC); |
272 | writel(adc_gc | VF610_ADC_CAL, info->regs + VF610_REG_ADC_GC); | 271 | writel(adc_gc | VF610_ADC_CAL, info->regs + VF610_REG_ADC_GC); |
273 | 272 | ||
274 | timeout = wait_for_completion_timeout | 273 | if (!wait_for_completion_timeout(&info->completion, VF610_ADC_TIMEOUT)) |
275 | (&info->completion, VF610_ADC_TIMEOUT); | ||
276 | if (timeout == 0) | ||
277 | dev_err(info->dev, "Timeout for adc calibration\n"); | 274 | dev_err(info->dev, "Timeout for adc calibration\n"); |
278 | 275 | ||
279 | adc_gc = readl(info->regs + VF610_REG_ADC_GS); | 276 | adc_gc = readl(info->regs + VF610_REG_ADC_GS); |