mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
iio: adc: nxp-sar-adc: use field_get() for EOC bit check
Use field_get() here now that runtime-mask support exists, and drop the obsolete TODO. Since NXP_SAR_ADC_EOC_CH(c) is BIT(c), the resulting !-test is semantically identical. No functional change. Reviewed-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Piyush Patle <piyushpatle228@gmail.com> Acked-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
1619d52fce
commit
6cc18c0dc2
|
|
@ -317,11 +317,7 @@ static int nxp_sar_adc_read_data(struct nxp_sar_adc *info, unsigned int chan)
|
|||
|
||||
ceocfr = readl(NXP_SAR_ADC_CEOCFR0(info->regs));
|
||||
|
||||
/*
|
||||
* FIELD_GET() can not be used here because EOC_CH is not constant.
|
||||
* TODO: Switch to field_get() when it will be available.
|
||||
*/
|
||||
if (!(NXP_SAR_ADC_EOC_CH(chan) & ceocfr))
|
||||
if (!field_get(NXP_SAR_ADC_EOC_CH(chan), ceocfr))
|
||||
return -EIO;
|
||||
|
||||
cdr = readl(NXP_SAR_ADC_CDR(info->regs, chan));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user