Skip to content

Commit 0f73cc6

Browse files
committed
iio: adc: at91-sama5d2_adc: move oversampling storage in its function
Move the storage of oversampling_ratio in at91_adc_config_emr(). This prepares for the next commits. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
1 parent a77f8a1 commit 0f73cc6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/iio/adc/at91-sama5d2_adc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,8 @@ static int at91_adc_config_emr(struct at91_adc_state *st,
796796

797797
at91_adc_writel(st, EMR, emr);
798798

799+
st->oversampling_ratio = oversampling_ratio;
800+
799801
return 0;
800802
}
801803

@@ -1689,7 +1691,6 @@ static int at91_adc_write_raw(struct iio_dev *indio_dev,
16891691
ret = at91_adc_config_emr(st, val);
16901692
if (ret)
16911693
return ret;
1692-
st->oversampling_ratio = val;
16931694
return 0;
16941695
case IIO_CHAN_INFO_SAMP_FREQ:
16951696
if (val < st->soc_info.min_sample_rate ||

0 commit comments

Comments
 (0)