summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPiyush Patle <piyushpatle228@gmail.com>2026-04-11 03:11:25 +0530
committerJonathan Cameron <jic23@kernel.org>2026-04-27 09:58:22 +0100
commit6cc18c0dc2886df14095b89a84d016b6d4c84fb3 (patch)
treed2ad624e4bef27f85481c817115d9c9dcb6c4034 /drivers
parent1619d52fce78b47021a2f1aa5b95f7986ab66c0f (diff)
downloadlinux-6cc18c0dc2886df14095b89a84d016b6d4c84fb3.tar.gz
linux-6cc18c0dc2886df14095b89a84d016b6d4c84fb3.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/adc/nxp-sar-adc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/iio/adc/nxp-sar-adc.c b/drivers/iio/adc/nxp-sar-adc.c
index 9d9f2c76bed4..8340c041e7bc 100644
--- a/drivers/iio/adc/nxp-sar-adc.c
+++ b/drivers/iio/adc/nxp-sar-adc.c
@@ -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));