]> git.dujemihanovic.xyz Git - u-boot.git/commit
rng: detect RISC-V Zkr RNG device in bind method
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 4 Nov 2023 06:51:07 +0000 (08:51 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 9 Jan 2024 06:37:05 +0000 (07:37 +0100)
commit1351cd3b4b1b18cafa4893a44378ca6b1d091c8e
tree5d1b7f0c0567ea34219d64b1cd76aea0b6c23d0b
parentbadef4cd4a9154776238cb1fad6d22bc93340303
rng: detect RISC-V Zkr RNG device in bind method

The existence of devices should be checked in the bind method and not in
the probe method. Adjust the RISC-V Zkr RNG driver accordingly.

Use ENOENT (and not ENODEV) to signal that the device is not available.

Fixes: ceec977ba1a9 ("rng: Provide a RNG based on the RISC-V Zkr ISA extension")
Reported-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
drivers/rng/riscv_zkr_rng.c