Linux IIO development
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: jic23@kernel.org
Cc: linux-iio@vger.kernel.org, andriy.shevchenko@intel.com,
	Fabio Estevam <festevam@denx.de>
Subject: [PATCH] iio: adc: ti-ads124s08: Switch to fsleep()
Date: Mon,  9 Dec 2024 15:02:42 -0300	[thread overview]
Message-ID: <20241209180242.1258587-1-festevam@gmail.com> (raw)

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(-)

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


             reply	other threads:[~2024-12-09 18:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 18:02 Fabio Estevam [this message]
2024-12-09 18:13 ` [PATCH] iio: adc: ti-ads124s08: Switch to fsleep() Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241209180242.1258587-1-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=festevam@denx.de \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox