iio: adc: stm32-dfsdm: fix call to stop channel
authorFabrice Gasnier <fabrice.gasnier@st.com>
Fri, 23 Feb 2018 12:50:56 +0000 (13:50 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 24 Feb 2018 12:57:11 +0000 (12:57 +0000)
stm32_dfsdm_stop_channel must be called with channel id, not filter id.

Fixes: e2e6771c6462 ("IIO: ADC: add STM32 DFSDM sigma delta ADC support")
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/stm32-dfsdm-adc.c

index daa026d6a94f90304d16cfc4348a963833c973e7..0eff8119119c8394858b1f3a4f6bc9b0fcf52c52 100644 (file)
@@ -464,7 +464,7 @@ stop_channels:
 
        regmap_update_bits(regmap, DFSDM_CR1(adc->fl_id),
                           DFSDM_CR1_RCONT_MASK, 0);
-       stm32_dfsdm_stop_channel(adc->dfsdm, adc->fl_id);
+       stm32_dfsdm_stop_channel(adc->dfsdm, adc->ch_id);
 
        return ret;
 }