Skip to content
Commit 9a03259c authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: 29e9122b ("be2net: Export board temperature using hwmon-sysfs interface.")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aea0929e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment