aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2020-01-15 13:54:17 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-01-27 11:41:08 +0100
commit263c8c4c76d9da63f1f8805ac5fc62a270448301 (patch)
treebe79ab2721145e884ef496ab17ea3c4ceba3b7cb /drivers/thermal
parentARM: configs: Build BCM2711 thermal as module (diff)
downloadlinux-dev-263c8c4c76d9da63f1f8805ac5fc62a270448301.tar.xz
linux-dev-263c8c4c76d9da63f1f8805ac5fc62a270448301.zip
thermal: rcar_thermal: Use usleep_range() instead of udelay()
rcar_thermal_update_temp() takes a mutex, so it is always called in a context that can sleep. Hence replace the 300 µs busy loop by a call to usleep_range(), to allow other threads to run. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20200115125417.5263-1-geert+renesas@glider.be
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/rcar_thermal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index d0873de718da..a8dd96d2d24c 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -219,7 +219,7 @@ static int rcar_thermal_update_temp(struct rcar_thermal_priv *priv)
* to get stable temperature.
* see "Usage Notes" on datasheet
*/
- udelay(300);
+ usleep_range(300, 400);
new = rcar_thermal_read(priv, THSSR) & CTEMP;
if (new == old) {