linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: hid-asus: select CONFIG_POWER_SUPPLY
@ 2019-03-04 19:54 Arnd Bergmann
  2019-03-11 14:57 ` Benjamin Tissoires
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-03-04 19:54 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires
  Cc: NOGUCHI Hiroshi, Arnd Bergmann, linux-input, linux-kernel

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 6ca8d322b487..4ca0cdfa6b33 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] HID: hid-asus: select CONFIG_POWER_SUPPLY
  2019-03-04 19:54 [PATCH] HID: hid-asus: select CONFIG_POWER_SUPPLY Arnd Bergmann
@ 2019-03-11 14:57 ` Benjamin Tissoires
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Tissoires @ 2019-03-11 14:57 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jiri Kosina, NOGUCHI Hiroshi, open list:HID CORE LAYER, lkml

On Mon, Mar 4, 2019 at 8:55 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Applied to for-5.1/upstream-fixes

Cheers,
Benjamin

>  drivers/hid/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> index 6ca8d322b487..4ca0cdfa6b33 100644
> --- a/drivers/hid/Kconfig
> +++ b/drivers/hid/Kconfig
> @@ -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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-11 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 19:54 [PATCH] HID: hid-asus: select CONFIG_POWER_SUPPLY Arnd Bergmann
2019-03-11 14:57 ` Benjamin Tissoires

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).