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:
Piyush Patle 2026-04-11 03:11:25 +05:30 committed by Jonathan Cameron
parent 1619d52fce
commit 6cc18c0dc2

View File

@ -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));