]> git.dujemihanovic.xyz Git - linux.git/commitdiff
platform: cznic: turris-omnia-mcu: fix HW_RANDOM dependency
authorArnd Bergmann <arnd@arndb.de>
Mon, 9 Sep 2024 11:04:09 +0000 (11:04 +0000)
committerArnd Bergmann <arnd@arndb.de>
Wed, 11 Sep 2024 08:54:21 +0000 (08:54 +0000)
There is still a build failure when the rwrng support is in a loadable
module but the mcu driver is built-in:

arm-linux-gnueabi-ld: drivers/platform/cznic/turris-omnia-mcu-trng.o: in function `omnia_mcu_register_trng':
turris-omnia-mcu-trng.c:(.text.omnia_mcu_register_trng+0x11c): undefined reference to `devm_hwrng_register'

Change the dependency to explicitly disallow the broken
configuration.

Fixes: 41bb142a4028 ("platform: cznic: turris-omnia-mcu: Add support for MCU provided TRNG")
Reviewed-by: Marek BehĂșn <kabel@kernel.org>
Link: https://lore.kernel.org/r/20240909110417.247453-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/platform/cznic/Kconfig

index a111eca8ff57d2b291d1d2388ef32e0d34a402e5..49c383eb67854173babef2ada3d60a2f562cd4bd 100644 (file)
@@ -70,7 +70,7 @@ config TURRIS_OMNIA_MCU_TRNG
        bool "Turris Omnia MCU true random number generator"
        default y
        depends on TURRIS_OMNIA_MCU_GPIO
-       depends on HW_RANDOM
+       depends on HW_RANDOM=y || HW_RANDOM=TURRIS_OMNIA_MCU
        help
          Say Y here to add support for the true random number generator
          provided by CZ.NIC's Turris Omnia MCU.