bus: ti-sysc: Fix sleeping function called from invalid context for RTC quirk
authorTony Lindgren <tony@atomide.com>
Thu, 2 Jul 2020 17:41:02 +0000 (10:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:34:07 +0000 (09:34 +0200)
commit884462339af75cb596001fe93172abcd3e502bcb
tree8bc05d39e799847a66c0f2827d282c1fa34d6b5c
parent826dc08af3f16d0aba7d3308d3fe933d0cc5700e
bus: ti-sysc: Fix sleeping function called from invalid context for RTC quirk

[ Upstream commit afe6f1eeb08f85e57f0a02b71efb5a0839606aac ]

With CONFIG_DEBUG_ATOMIC_SLEEP enabled we can see the following with RTC probe:

BUG: sleeping function called from invalid context at drivers/bus/ti-sysc.c:1736
...
(sysc_quirk_rtc) from [<c060d01c>] (sysc_write_sysconfig+0x1c/0x60)
(sysc_write_sysconfig) from [<c060d9f4>] (sysc_enable_module+0x11c/0x274)
(sysc_enable_module) from [<c060f37c>] (sysc_probe+0xe9c/0x1380)
(sysc_probe) from [<c06e9384>] (platform_drv_probe+0x48/0x98)

Fixes: e8639e1c986a ("bus: ti-sysc: Handle module unlock quirk needed for some RTC")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bus/ti-sysc.c