crypto: stm32/crc32 - fix multi-instance
authorNicolas Toromanoff <nicolas.toromanoff@st.com>
Tue, 12 May 2020 14:11:11 +0000 (16:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:31:07 +0000 (09:31 +0200)
commit188e3e6ed902a34d1efa73616eb2c86918237bc3
treecd6455aac1859f7a7392f8902ebb5042c28165b8
parentd879598b8dae00da888dd957c913bd0f9687f42a
crypto: stm32/crc32 - fix multi-instance

[ Upstream commit 10b89c43a64eb0d236903b79a3bc9d8f6cbfd9c7 ]

Ensure CRC algorithm is registered only once in crypto framework when
there are several instances of CRC devices.

Update the CRC device list management to avoid that only the first CRC
instance is used.

Fixes: b51dbe90912a ("crypto: stm32 - Support for STM32 CRC32 crypto module")

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