Make use of config_enabled() check insted of raw #ifdef's within function bodies when checking CONFIG_PM_SLEEP option.
Signed-off-by: Bartosz Markowski <bartosz.markow...@tieto.com> --- drivers/net/wireless/ath/ath10k/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index b3c1e45..62f93d1 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -72,10 +72,10 @@ static void ath10k_send_suspend_complete(struct ath10k *ar) { ath10k_dbg(ATH10K_DBG_CORE, "%s\n", __func__); -#if defined(CONFIG_PM_SLEEP) - ar->is_target_paused = true; - wake_up(&ar->event_queue); -#endif + if(config_enabled(CONFIG_PM_SLEEP)) { + ar->is_target_paused = true; + wake_up(&ar->event_queue); + } } static int ath10k_check_fw_version(struct ath10k *ar) @@ -468,9 +468,9 @@ struct ath10k *ath10k_core_create(void *hif_priv, struct device *dev, INIT_WORK(&ar->offchan_tx_work, ath10k_offchan_tx_work); skb_queue_head_init(&ar->offchan_tx_queue); -#if defined(CONFIG_PM_SLEEP) - init_waitqueue_head(&ar->event_queue); -#endif + if (config_enabled(CONFIG_PM_SLEEP)) + init_waitqueue_head(&ar->event_queue); + return ar; err_wq: -- 1.7.10 _______________________________________________ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel