OSDN Git Service

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)
commit2f5ee72ee950a677069ee8ab75af40cebba3bb3c
tree558bdf51efae37baaa6fcf1444de4198f13f4efe
parent53e748c2758ca24854b6ce89fb08a93a36772dc0
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