thermal: rcar_thermal: Prevent hardware access during system suspend
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 12 Oct 2018 07:20:15 +0000 (09:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Nov 2019 17:28:39 +0000 (18:28 +0100)
commit00192e5ead67e3a350a1eca10dfedf7c1bcc6b16
tree84b6de751b3f3a9c2b5af4395d8272e17092d38a
parent28d4020576ee457394550ce20c61c6fe42c9c170
thermal: rcar_thermal: Prevent hardware access during system suspend

[ Upstream commit 3a31386217628ffe2491695be2db933c25dde785 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/rcar_thermal.c