]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: cavium/zip - register algorithm only if hardware is present
authorCorentin Labbe <clabbe@baylibre.com>
Mon, 21 Feb 2022 11:52:34 +0000 (11:52 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 2 Mar 2022 22:46:19 +0000 (10:46 +1200)
commit5a58b7912d7ba21db3555f1ccb4a771fc649c35a
tree558bdf51efae37baaa6fcf1444de4198f13f4efe
parent0531c8535f5cb20193108284fd73d3b23e97582c
crypto: cavium/zip - register algorithm only if hardware is present

On my renesas salavator-X, I saw some cavium driver failing crypto
self-tests.
But salvator does not have such hardware.
This is due to cavium/zip driver registering algorithms even if hardware
is not present.
The solution is to move algorithm registration in the probe function.
This permits also to simplify module init/exit by using
module_pci_driver.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/cavium/zip/zip_main.c