diff mbox series

iio: adc: ti-ads124s08: Switch to fsleep()

Message ID 20241209180242.1258587-1-festevam@gmail.com (mailing list archive)
State Superseded
Headers show
Series iio: adc: ti-ads124s08: Switch to fsleep() | expand

Commit Message

Fabio Estevam Dec. 9, 2024, 6:02 p.m. UTC
From: Fabio Estevam <festevam@denx.de>

According to Documentation/timers/delay_sleep_functions.rst,
fsleep() is the preferred delay function to be used in non-atomic
context, so switch to it accordingly.

Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 drivers/iio/adc/ti-ads124s08.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko Dec. 9, 2024, 6:13 p.m. UTC | #1
On Mon, Dec 09, 2024 at 03:02:42PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> According to Documentation/timers/delay_sleep_functions.rst,
> fsleep() is the preferred delay function to be used in non-atomic
> context, so switch to it accordingly.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Can you also change my email in other tags and email headers to be
@linux.intel.com?
diff mbox series

Patch

diff --git a/drivers/iio/adc/ti-ads124s08.c b/drivers/iio/adc/ti-ads124s08.c
index f452f57f11c9..77c299bb4ebc 100644
--- a/drivers/iio/adc/ti-ads124s08.c
+++ b/drivers/iio/adc/ti-ads124s08.c
@@ -184,7 +184,7 @@  static int ads124s_reset(struct iio_dev *indio_dev)
 
 	if (priv->reset_gpio) {
 		gpiod_set_value_cansleep(priv->reset_gpio, 0);
-		udelay(200);
+		fsleep(200);
 		gpiod_set_value_cansleep(priv->reset_gpio, 1);
 	} else {
 		return ads124s_write_cmd(indio_dev, ADS124S08_CMD_RESET);