summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorKalle Valo2015-01-07 16:04:10 +0100
committerKalle Valo2015-01-09 17:12:36 +0100
commit96bba98393f97e4c4bfe29341b3ad2adef32bde2 (patch)
tree213eaf2e7cda3f5b5d1b5d78bae7b23dacabd0a0 /drivers/net/wireless
parentath10k: set phymode to 11b when NO_OFDM flag set (diff)
downloadkernel-qcow2-linux-96bba98393f97e4c4bfe29341b3ad2adef32bde2.tar.gz
kernel-qcow2-linux-96bba98393f97e4c4bfe29341b3ad2adef32bde2.tar.xz
kernel-qcow2-linux-96bba98393f97e4c4bfe29341b3ad2adef32bde2.zip
ath10k: fix build error when hwmon is off
kbuild reported a linking error: ERROR: "devm_hwmon_device_register_with_groups" [drivers/net/wireless/ath/ath10k/ath10k_core.ko] undefined! Fix it by returning early and letting the compiler to optimise out the function call. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath10k/thermal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c
index d93913538d18..b14ae8d135f6 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.c
+++ b/drivers/net/wireless/ath/ath10k/thermal.c
@@ -213,6 +213,11 @@ int ath10k_thermal_register(struct ath10k *ar)
if (ar->wmi.op_version != ATH10K_FW_WMI_OP_VERSION_10_2_4)
return 0;
+ /* Avoid linking error on devm_hwmon_device_register_with_groups, I
+ * guess linux/hwmon.h is missing proper stubs. */
+ if (!config_enabled(HWMON))
+ return 0;
+
hwmon_dev = devm_hwmon_device_register_with_groups(ar->dev,
"ath10k_hwmon", ar,
ath10k_hwmon_groups);