Skip to contentSkip to conversation

HID: hid-asus: select CONFIG_POWER_SUPPLY

PATCH Applied Arnd Bergmann 2 participants 2 messages Mar 4, 2019 – Mar 11, 2019 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: hid-asus: select CONFIG_POWER_SUPPLY

The newly added power supply code fails to link when the power supply core code is disabled:

drivers/hid/hid-asus.o: In function `asus_battery_get_property':
hid-asus.c:(.text+0x11de): undefined reference to power_supply_get_drvdata' drivers/hid/hid-asus.o: In function asus_probe':
hid-asus.c:(.text+0x170c): undefined reference to devm_power_supply_register' hid-asus.c:(.text+0x1734): undefined reference to power_supply_powers' drivers/hid/hid-asus.o: In function `asus_raw_event':
hid-asus.c:(.text+0x1914): undefined reference to `power_supply_changed'

Select the subsystem from Kconfig as we do for other hid drivers already.

Fixes 6311d329e12a ("HID: hid-asus: Add BT keyboard dock battery monitoring support")
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/Kconfig +1 -0
index 6ca8d322b487..4ca0cdfa6b33 100644
@@ -150,6 +150,7 @@ config HID_ASUS
 	tristate "Asus"
 	depends on LEDS_CLASS
 	depends on ASUS_WMI || ASUS_WMI=n
+	select POWER_SUPPLY
 	---help---
 	Support for Asus notebook built-in keyboard and touchpad via i2c, and
 	the Asus Republic of Gamers laptop keyboard special keys.
Signature · 1 line
2.20.0
#1 lore raw
Quoted 12 lines · Arnd Bergmann

The newly added power supply code fails to link when the power supply core code is disabled:

drivers/hid/hid-asus.o: In function `asus_battery_get_property':
hid-asus.c:(.text+0x11de): undefined reference to power_supply_get_drvdata' drivers/hid/hid-asus.o: In function asus_probe':
hid-asus.c:(.text+0x170c): undefined reference to devm_power_supply_register' hid-asus.c:(.text+0x1734): undefined reference to power_supply_powers' drivers/hid/hid-asus.o: In function `asus_raw_event':
hid-asus.c:(.text+0x1914): undefined reference to `power_supply_changed'

Quoted 5 lines

Select the subsystem from Kconfig as we do for other hid drivers already.

Fixes 6311d329e12a ("HID: hid-asus: Add BT keyboard dock battery monitoring support")

---

Applied to for-5.1/upstream-fixes

Cheers,
Benjamin

Quoted 18 lines
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/Kconfig +1 -1
index 6ca8d322b487..4ca0cdfa6b33 100644
@@ -150,6 +150,7 @@ config HID_ASUS
        tristate "Asus"
        depends on LEDS_CLASS
        depends on ASUS_WMI || ASUS_WMI=n
+       select POWER_SUPPLY
        ---help---
        Support for Asus notebook built-in keyboard and touchpad via i2c, and
        the Asus Republic of Gamers laptop keyboard special keys.
--

2.20.0