Re: [PATCH] net: aquantia: fix undefined devm_hwmon_device_register_with_info reference
From: David Miller
Date: Thu May 09 2019 - 12:51:29 EST
From: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
Date: Thu, 9 May 2019 23:32:35 +0800
> 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@xxxxxxxxxx>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
Applied.
It's a shame there isn't a dummy inline of this helper defined when HWMON is unset.