Skip to contentSkip to conversation

platform/x86/intel: bytcrc_pwrsrc: fix power_supply dependency

PATCH In review Arnd Bergmann 3 participants 3 messages Dec 16, 2024 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86/intel: bytcrc_pwrsrc: fix power_supply dependency

From: Arnd Bergmann <[email protected]>

The driver now fails to link when the power supply core is missing or in a loadable module:

_64-linux/bin/x86_64-linux-ld: drivers/platform/x86/intel/bytcrc_pwrsrc.o: in function `crc_pwrsrc_irq_handler':
bytcrc_pwrsrc.c:(.text+0x2aa): undefined reference to `power_supply_changed'
x86_64-linux-ld: drivers/platform/x86/intel/bytcrc_pwrsrc.o: in function `crc_pwrsrc_psy_get_property':
bytcrc_pwrsrc.c:(.text+0x2f6): undefined reference to `power_supply_get_drvdata'
x86_64-linux-ld: drivers/platform/x86/intel/bytcrc_pwrsrc.o: in function `crc_pwrsrc_probe':
bytcrc_pwrsrc.c:(.text+0x644): undefined reference to `devm_power_supply_register'

Add the appropriate dependency for it.

Fixes 0130ec83c553 ("platform/x86/intel: bytcrc_pwrsrc: Optionally register a power_supply dev")
---
 drivers/platform/x86/intel/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/intel/Kconfig +1 -0
index eb698dcb9af9..19a2246f2770 100644
@@ -83,6 +83,7 @@ config INTEL_BXTWC_PMIC_TMU
 config INTEL_BYTCRC_PWRSRC
 	tristate "Intel Bay Trail Crystal Cove power source driver"
 	depends on INTEL_SOC_PMIC
+	depends on POWER_SUPPLY
 	help
 	  This option adds a power source driver for Crystal Cove PMICs
 	  on Intel Bay Trail devices.
Signature · 1 line
2.39.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The driver now fails to link when the power supply core is missing or in a loadable module:

Quoted 8 lines

_64-linux/bin/x86_64-linux-ld: drivers/platform/x86/intel/bytcrc_pwrsrc.o: in function `crc_pwrsrc_irq_handler':
bytcrc_pwrsrc.c:(.text+0x2aa): undefined reference to `power_supply_changed'
x86_64-linux-ld: drivers/platform/x86/intel/bytcrc_pwrsrc.o: in function `crc_pwrsrc_psy_get_property':
bytcrc_pwrsrc.c:(.text+0x2f6): undefined reference to `power_supply_get_drvdata'
x86_64-linux-ld: drivers/platform/x86/intel/bytcrc_pwrsrc.o: in function `crc_pwrsrc_probe':
bytcrc_pwrsrc.c:(.text+0x644): undefined reference to `devm_power_supply_register'

Add the appropriate dependency for it.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#2 lore raw
In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann

The driver now fails to link when the power supply core is missing or in a loadable module:

_64-linux/bin/x86_64-linux-ld: drivers/platform/x86/intel/bytcrc_pwrsrc.o: in function `crc_pwrsrc_irq_handler':
bytcrc_pwrsrc.c:(.text+0x2aa): undefined reference to `power_supply_changed'
x86_64-linux-ld: drivers/platform/x86/intel/bytcrc_pwrsrc.o: in function `crc_pwrsrc_psy_get_property':
bytcrc_pwrsrc.c:(.text+0x2f6): undefined reference to `power_supply_get_drvdata'
x86_64-linux-ld: drivers/platform/x86/intel/bytcrc_pwrsrc.o: in function `crc_pwrsrc_probe':
bytcrc_pwrsrc.c:(.text+0x644): undefined reference to `devm_power_supply_register'

[...]

Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86/intel: bytcrc_pwrsrc: fix power_supply dependency

      commit: 6bcb50954580caa48fceeeb4b4af0fef746a89d6

--
i.