diff mbox series

hwmon: pmbus: ibm-cffps depends on LEDS_CLASS

Message ID 20180112154926.3646202-1-arnd@arndb.de
State Accepted
Commit b0076406495cd5905284d1f235db77d8ab54951e
Headers show
Series hwmon: pmbus: ibm-cffps depends on LEDS_CLASS | expand

Commit Message

Arnd Bergmann Jan. 12, 2018, 3:49 p.m. UTC
Building without CONFIG_LEDS_CLASS causes a link failure:

drivers/hwmon/pmbus/ibm-cffps.o: In function `ibm_cffps_probe':
ibm-cffps.c:(.text+0x4f4): undefined reference to `devm_of_led_classdev_register'

This adds the required dependency.

Fixes: f69316d62c70 ("hwmon: (pmbus) Add IBM Common Form Factor (CFF) power supply driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/hwmon/pmbus/Kconfig | 1 +
 1 file changed, 1 insertion(+)

-- 
2.9.0

Comments

Guenter Roeck Jan. 12, 2018, 5:19 p.m. UTC | #1
On Fri, Jan 12, 2018 at 04:49:00PM +0100, Arnd Bergmann wrote:
> Building without CONFIG_LEDS_CLASS causes a link failure:

> 

> drivers/hwmon/pmbus/ibm-cffps.o: In function `ibm_cffps_probe':

> ibm-cffps.c:(.text+0x4f4): undefined reference to `devm_of_led_classdev_register'

> 

> This adds the required dependency.

> 

> Fixes: f69316d62c70 ("hwmon: (pmbus) Add IBM Common Form Factor (CFF) power supply driver")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


I wanted to let Edward decide if he wants the new dependency or conditional code
in the driver. Not having heard from him, I'll take your patch instead for now.

Thanks,
Guenter

> ---

>  drivers/hwmon/pmbus/Kconfig | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig

> index 08479006c7f9..6e4298e99222 100644

> --- a/drivers/hwmon/pmbus/Kconfig

> +++ b/drivers/hwmon/pmbus/Kconfig

> @@ -39,6 +39,7 @@ config SENSORS_ADM1275

>  

>  config SENSORS_IBM_CFFPS

>  	tristate "IBM Common Form Factor Power Supply"

> +	depends on LEDS_CLASS

>  	help

>  	  If you say yes here you get hardware monitoring support for the IBM

>  	  Common Form Factor power supply.

> -- 

> 2.9.0

>
diff mbox series

Patch

diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
index 08479006c7f9..6e4298e99222 100644
--- a/drivers/hwmon/pmbus/Kconfig
+++ b/drivers/hwmon/pmbus/Kconfig
@@ -39,6 +39,7 @@  config SENSORS_ADM1275
 
 config SENSORS_IBM_CFFPS
 	tristate "IBM Common Form Factor Power Supply"
+	depends on LEDS_CLASS
 	help
 	  If you say yes here you get hardware monitoring support for the IBM
 	  Common Form Factor power supply.