summaryrefslogtreecommitdiff
path: root/drivers/crypto/atmel-sha204a.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2022-04-30 16:01:46 +0900
committerHerbert Xu <herbert@gondor.apana.org.au>2022-05-06 18:16:55 +0800
commit0a2f4b5785ca5e9c5bc2d4e59183e016096ee889 (patch)
treebe98970187a9b0f368c20bc79e9fd12703f9e2cf /drivers/crypto/atmel-sha204a.c
parent59f71498c7ff591824863be55b0eff5aae743947 (diff)
downloadlwn-0a2f4b5785ca5e9c5bc2d4e59183e016096ee889.tar.gz
lwn-0a2f4b5785ca5e9c5bc2d4e59183e016096ee889.zip
crypto: atmel - Avoid flush_scheduled_work() usage
Flushing system-wide workqueues is dangerous and will be forbidden. Replace system_wq with local atmel_wq. If CONFIG_CRYPTO_DEV_ATMEL_{I2C,ECC,SHA204A}=y, the ordering in Makefile guarantees that module_init() for atmel-i2c runs before module_init() for atmel-ecc and atmel-sha204a runs. Link: https://lkml.kernel.org/r/49925af7-78a8-a3dd-bce6-cfc02e1a9236@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/atmel-sha204a.c')
-rw-r--r--drivers/crypto/atmel-sha204a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/atmel-sha204a.c b/drivers/crypto/atmel-sha204a.c
index 50363999b990..e4087bdd2475 100644
--- a/drivers/crypto/atmel-sha204a.c
+++ b/drivers/crypto/atmel-sha204a.c
@@ -160,7 +160,7 @@ static int __init atmel_sha204a_init(void)
static void __exit atmel_sha204a_exit(void)
{
- flush_scheduled_work();
+ atmel_i2c_flush_queue();
i2c_del_driver(&atmel_sha204a_driver);
}