Commit ee3ac290 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Jonathan Cameron

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: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent a36385a2
...@@ -259,7 +259,6 @@ static void vf610_adc_cfg_post_set(struct vf610_adc *info) ...@@ -259,7 +259,6 @@ static void vf610_adc_cfg_post_set(struct vf610_adc *info)
static void vf610_adc_calibration(struct vf610_adc *info) static void vf610_adc_calibration(struct vf610_adc *info)
{ {
int adc_gc, hc_cfg; int adc_gc, hc_cfg;
int timeout;
if (!info->adc_feature.calibration) if (!info->adc_feature.calibration)
return; return;
...@@ -271,9 +270,7 @@ static void vf610_adc_calibration(struct vf610_adc *info) ...@@ -271,9 +270,7 @@ static void vf610_adc_calibration(struct vf610_adc *info)
adc_gc = readl(info->regs + VF610_REG_ADC_GC); adc_gc = readl(info->regs + VF610_REG_ADC_GC);
writel(adc_gc | VF610_ADC_CAL, info->regs + VF610_REG_ADC_GC); writel(adc_gc | VF610_ADC_CAL, info->regs + VF610_REG_ADC_GC);
timeout = wait_for_completion_timeout if (!wait_for_completion_timeout(&info->completion, VF610_ADC_TIMEOUT))
(&info->completion, VF610_ADC_TIMEOUT);
if (timeout == 0)
dev_err(info->dev, "Timeout for adc calibration\n"); dev_err(info->dev, "Timeout for adc calibration\n");
adc_gc = readl(info->regs + VF610_REG_ADC_GS); adc_gc = readl(info->regs + VF610_REG_ADC_GS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment