summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2021-10-15 10:15:01 +0200
committerLee Jones <lee.jones@linaro.org>2021-10-21 09:24:00 +0100
commit789e5ebcc61b72a71717b02b62e6c6f10fdbb722 (patch)
tree3aea3a75ec5b89c80b9006f73d2af08deb43662a /drivers/iio
parentb61a9d32d2d7339aaa59c50f6e33e8a79f7944e7 (diff)
iio: adc: ti_am335x_adc: Add a unit to the timeout delay
The lack of unit in the macro name kind of tricked me when I was troubleshooting an issue. Physical constants should always get a unit. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-44-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/adc/ti_am335x_adc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index 6f47a1ace3d4..e7dba10b29b4 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -101,7 +101,7 @@ static int tiadc_wait_idle(struct tiadc_device *adc_dev)
return readl_poll_timeout(adc_dev->mfd_tscadc->tscadc_base + REG_ADCFSM,
val, !(val & SEQ_STATUS), 10,
- IDLE_TIMEOUT * 1000 * adc_dev->channels);
+ IDLE_TIMEOUT_MS * 1000 * adc_dev->channels);
}
static void tiadc_step_config(struct iio_dev *indio_dev)
@@ -461,7 +461,7 @@ static int tiadc_read_raw(struct iio_dev *indio_dev,
am335x_tsc_se_set_once(adc_dev->mfd_tscadc, step_en);
/* Wait for Fifo threshold interrupt */
- timeout = jiffies + msecs_to_jiffies(IDLE_TIMEOUT * adc_dev->channels);
+ timeout = jiffies + msecs_to_jiffies(IDLE_TIMEOUT_MS * adc_dev->channels);
while (1) {
fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT);
if (fifo1count)