crypto: atmel-i2c - Fix build error while CRC16 set to m
authorYueHaibing <yuehaibing@huawei.com>
Fri, 31 May 2019 12:17:49 +0000 (20:17 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 6 Jun 2019 06:44:16 +0000 (14:44 +0800)
If CRYPTO_DEV_ATMEL_ECC is set m, which select CRC16 to m,
while CRYPTO_DEV_ATMEL_SHA204A is set to y, building fails.

drivers/crypto/atmel-i2c.o: In function 'atmel_i2c_checksum':
atmel-i2c.c:(.text+0x16): undefined reference to 'crc16'

Add CRC16 dependency to CRYPTO_DEV_ATMEL_SHA204A

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: da001fb651b0 ("crypto: atmel-i2c - add support for SHA204A random number generator")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/Kconfig

index bc7abad9fdff03c5463c17e5d97dd2091379c810..67af688d7d847b6ebad0e129a1170a80839dc92b 100644 (file)
@@ -541,6 +541,7 @@ config CRYPTO_DEV_ATMEL_SHA204A
        depends on I2C
        select CRYPTO_DEV_ATMEL_I2C
        select HW_RANDOM
+       select CRC16
        help
          Microhip / Atmel SHA accelerator and RNG.
          Select this if you want to use the Microchip / Atmel SHA204A