qlcnic: Fix Kconfig dependency on HWMON
authorHarish Patil <harish.patil@qlogic.com>
Wed, 7 May 2014 06:06:15 +0000 (02:06 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 May 2014 21:23:25 +0000 (17:23 -0400)
Commit 1f0f467b670e "qlcnic: Add hwmon interface to export board
temperature" introduced a randconfig build error in the case
when the hwmon framework is built as a module and the qlcnic
driver itself is built-in:

drivers/built-in.o: In function `qlcnic_register_hwmon_dev':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c:1301:
undefined reference to `hwmon_device_register_with_groups'
drivers/built-in.o: In function `qlcnic_unregister_hwmon_dev':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c:1309:
undefined reference to `hwmon_device_unregister'.

This changes the Kconfig logic to enforce that the qlcnic hwmon
support can only be enabled if it is possible to successfully
build it.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/Kconfig

index b8184323faaecc3ccc2678d1ab4b73ce4766526f..d49cba1290814ecc175d925fca6ae2dd9227cded 100644 (file)
@@ -68,7 +68,7 @@ config QLCNIC_VXLAN
 
 config QLCNIC_HWMON
        bool "QLOGIC QLCNIC 82XX and 83XX family HWMON support"
-       depends on QLCNIC && HWMON
+       depends on QLCNIC && HWMON && !(QLCNIC=y && HWMON=m)
        default y
        ---help---
          This configuration parameter can be used to read the