Skip to contentSkip to conversation

HID: fix compiling error in u2fzero_probe()

PATCH In review Mao Wenan 2 participants 2 messages Apr 13, 2019 – Apr 15, 2019

Subsystems (2)
lore
Share & tools
lore

Mao Wenan

author
#0 lore raw

PATCH 1/1 HID: fix compiling error in u2fzero_probe()

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")
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/Kconfig +1 -0
index 4dc1035..76d8206 100644
@@ -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.
 
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 18 lines · Mao Wenan

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")
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/Kconfig +0 -0
index 4dc1035..76d8206 100644

drivers/hid/Kconfig config HID_U2FZERO · line 1020

Quoted 4 lines
drivers/hid/Kconfig +1 -0
@@ -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.

Signature · 2 lines
Jiri Kosina
SUSE Labs