Skip to content

Commit de5315c

Browse files
author
Michal Marek
committed
ath10k: Fix build with CONFIG_THERMAL=m
After commit cf4f219 ("kbuild: Allow to specify composite modules with modname-m"), thermal.c gets included in the driver and the build fails with drivers/net/wireless/ath/ath10k/thermal.c:119:6: error: redefinition of ‘ath10k_thermal_event_temperature’ drivers/net/wireless/ath/ath10k/thermal.h:54:20: note: previous definition of ‘ath10k_thermal_event_temperature’ was here drivers/net/wireless/ath/ath10k/thermal.c:136:6: error: redefinition of ‘ath10k_thermal_set_throttling’ drivers/net/wireless/ath/ath10k/thermal.h:59:20: note: previous definition of ‘ath10k_thermal_set_throttling’ was here drivers/net/wireless/ath/ath10k/thermal.c:162:5: error: redefinition of ‘ath10k_thermal_register’ drivers/net/wireless/ath/ath10k/thermal.h:45:19: note: previous definition of ‘ath10k_thermal_register’ was here drivers/net/wireless/ath/ath10k/thermal.c:216:6: error: redefinition of ‘ath10k_thermal_unregister’ drivers/net/wireless/ath/ath10k/thermal.h:50:20: note: previous definition of ‘ath10k_thermal_unregister’ was here Change the #ifdef to reflect the new kbuild behavior. Reported-by: kbuild test robot <fengguang.wu@intel.com> Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Michal Marek <mmarek@suse.com>
1 parent 5921be7 commit de5315c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/net/wireless/ath/ath10k/thermal.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct ath10k_thermal {
3636
int temperature;
3737
};
3838

39-
#ifdef CONFIG_THERMAL
39+
#if IS_REACHABLE(CONFIG_THERMAL)
4040
int ath10k_thermal_register(struct ath10k *ar);
4141
void ath10k_thermal_unregister(struct ath10k *ar);
4242
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);

0 commit comments

Comments
 (0)