]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: stm32/crc32 - don't sleep in runtime pm
authorNicolas Toromanoff <nicolas.toromanoff@st.com>
Tue, 12 May 2020 14:11:12 +0000 (16:11 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 22 May 2020 14:08:21 +0000 (00:08 +1000)
commit3fd07416700e2e700c4044981f564b18733d91fc
tree16b8fcab355ad087e0b241ad288f8bd53eba0a57
parentb2e0abd9ff804abb315d38fa7ef486f0e77dfdb0
crypto: stm32/crc32 - don't sleep in runtime pm

Ensure stm32_crc_update() and stm32_crc_init() can be called
in atomic context and can't sleep.

Add pm_runtime_irq_safe() to make pm_runtime_get_sync() atomic.
Change runtime pm to call clk_enable()/clk_disable() and change
system pm to unprepare/prepare the clock and force runtime pm
suspend/resume.

Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/stm32/stm32-crc32.c