diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2019-05-09 18:32:35 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-09 19:48:44 +0300 |
commit | 70610c922bae2f3f974eef955ef254defb7755ce (patch) | |
tree | cb5f67be9428a130d137d8d01073f8edf8643d58 | |
parent | d7e163ced48f942c9a307117e15b0f863a01bc1e (diff) | |
download | linux-70610c922bae2f3f974eef955ef254defb7755ce.tar.xz |
net: aquantia: fix undefined devm_hwmon_device_register_with_info reference
drivers/net/ethernet/aquantia/atlantic/aq_drvinfo.o: In function `aq_drvinfo_init':
aq_drvinfo.c:(.text+0xe8): undefined reference to `devm_hwmon_device_register_with_info'
Fix it by using #if IS_REACHABLE(CONFIG_HWMON).
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/aq_drvinfo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_drvinfo.c b/drivers/net/ethernet/aquantia/atlantic/aq_drvinfo.c index f5a92b2a5cd6..adad6a7acabe 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_drvinfo.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_drvinfo.c @@ -13,6 +13,7 @@ #include "aq_drvinfo.h" +#if IS_REACHABLE(CONFIG_HWMON) static int aq_hwmon_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel, long *value) { @@ -123,3 +124,7 @@ int aq_drvinfo_init(struct net_device *ndev) return err; } + +#else +int aq_drvinfo_init(struct net_device *ndev) { return 0; } +#endif |