]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: adc: ti-ads124s08: Switch to fsleep()
authorFabio Estevam <festevam@denx.de>
Mon, 9 Dec 2024 18:16:24 +0000 (15:16 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 3 Feb 2025 19:15:38 +0000 (19:15 +0000)
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@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://patch.msgid.link/20241209181624.1260868-1-festevam@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ti-ads124s08.c

index f452f57f11c95624dbef9077f077d563785530fe..77c299bb4ebcc1652780f947208afe1d5e75764b 100644 (file)
@@ -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);