diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2018-10-12 09:20:15 +0200 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2018-10-25 10:44:54 -0700 |
commit | 3a31386217628ffe2491695be2db933c25dde785 (patch) | |
tree | 36130612a0b28bba235ff2ac21cc6463fbe5231a /drivers/thermal | |
parent | 853cbc1f2d3a6ef9d5f6f99fe7c4b7595eae9d3a (diff) | |
download | linux-3a31386217628ffe2491695be2db933c25dde785.tar.bz2 |
thermal: rcar_thermal: Prevent hardware access during system suspend
On r8a7791/koelsch, sometimes the following message is printed during
system suspend:
rcar_thermal e61f0000.thermal: thermal sensor was broken
This happens if the workqueue runs while the device is already
suspended. Fix this by using the freezable system workqueue instead,
cfr. commit 51e20d0e3a60cf46 ("thermal: Prevent polling from happening
during system suspend").
Fixes: e0a5172e9eec7f0d ("thermal: rcar: add interrupt support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/rcar_thermal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 98f951391dcb..f0e385dd7a92 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -450,8 +450,8 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data) rcar_thermal_for_each_priv(priv, common) { if (rcar_thermal_had_changed(priv, status)) { rcar_thermal_irq_disable(priv); - schedule_delayed_work(&priv->work, - msecs_to_jiffies(300)); + queue_delayed_work(system_freezable_wq, &priv->work, + msecs_to_jiffies(300)); } } |