diff mbox series

HID: fix compiling error in u2fzero_probe()

Message ID 20190413134459.76045-1-maowenan@huawei.com (mailing list archive)
State Mainlined
Commit e252e0e0028167ea3d1eafa99c2ff9f62c444b0a
Delegated to: Jiri Kosina
Headers show
Series HID: fix compiling error in u2fzero_probe() | expand

Commit Message

Mao Wenan April 13, 2019, 1:44 p.m. UTC
There is one compiling error in u2fzero_probe()->u2fzero_init_hwrng(),
this is because HW_RANDOM is not set.

drivers/hid/hid-u2fzero.o: In function `u2fzero_probe':
hid-u2fzero.c:(.text+0xc70): undefined reference to `devm_hwrng_register'

Fixes: 42337b9d4d958("HID: add driver for U2F Zero built-in LED and RNG")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Mao Wenan <maowenan@huawei.com>
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Jiri Kosina April 15, 2019, 9:03 a.m. UTC | #1
On Sat, 13 Apr 2019, Mao Wenan wrote:

> There is one compiling error in u2fzero_probe()->u2fzero_init_hwrng(),
> this is because HW_RANDOM is not set.
> 
> drivers/hid/hid-u2fzero.o: In function `u2fzero_probe':
> hid-u2fzero.c:(.text+0xc70): undefined reference to `devm_hwrng_register'
> 
> Fixes: 42337b9d4d958("HID: add driver for U2F Zero built-in LED and RNG")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
> ---
>  drivers/hid/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> index 4dc1035..76d8206 100644
> --- a/drivers/hid/Kconfig
> +++ b/drivers/hid/Kconfig
> @@ -1017,6 +1017,7 @@ config HID_U2FZERO
>  	tristate "U2F Zero LED and RNG support"
>  	depends on USB_HID
>  	depends on LEDS_CLASS
> +	depends on HW_RANDOM

[ CCing Andrej ]

This was supposed to be sent by Andrej (together with other fixes), but 
you beat him to it. Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 4dc1035..76d8206 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -1017,6 +1017,7 @@  config HID_U2FZERO
 	tristate "U2F Zero LED and RNG support"
 	depends on USB_HID
 	depends on LEDS_CLASS
+	depends on HW_RANDOM
 	help
 	  Support for the LED of the U2F Zero device.