linux/drivers/net/ethernet/emulex/benet
Arnd Bergmann 9a03259c3d be2net: make hwmon interface optional
The hwmon interface in the be2net driver causes a link error when
be2net is built-in while the hwmon subsystem is a loadable module:

drivers/built-in.o: In function `be_probe':
drivers/net/ethernet/emulex/benet/be_main.c:5761: undefined reference to `devm_hwmon_device_register_with_groups'

This adds a new Kconfig symbol, following the example of multiple
other drivers that have the same problem. The new CONFIG_BE2NET_HWMON
will not be available when (BE2NET=y && HWMON=m) to avoid this
problem.

We have to also mark be_hwmon_show_temp as 'static' to ensure the
compiler can optimize out all the unused code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 29e9122b3a ("be2net: Export board temperature using hwmon-sysfs interface.")
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-19 16:40:04 -04:00
..
be_cmds.c be2net: Support for OS2BMC. 2015-05-14 12:21:42 -04:00
be_cmds.h be2net: Support for OS2BMC. 2015-05-14 12:21:42 -04:00
be_ethtool.c be2net: Export board temperature using hwmon-sysfs interface. 2015-05-14 12:21:41 -04:00
be_hw.h be2net: update copyright year to 2015 2015-05-09 16:27:04 -04:00
be_main.c be2net: make hwmon interface optional 2015-05-19 16:40:04 -04:00
be_roce.c be2net: update copyright year to 2015 2015-05-09 16:27:04 -04:00
be_roce.h be2net: update copyright year to 2015 2015-05-09 16:27:04 -04:00
be.h be2net: Support for OS2BMC. 2015-05-14 12:21:42 -04:00
Kconfig be2net: make hwmon interface optional 2015-05-19 16:40:04 -04:00
Makefile be2net: Add functionality to support RoCE driver 2012-05-08 11:17:47 -07:00