ath10k: core: match wait_for_completion_timeout return type
authorNicholas Mc Guire <hofrat@osadl.org>
Mon, 30 Mar 2015 12:39:21 +0000 (15:39 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 1 Apr 2015 17:17:50 +0000 (20:17 +0300)
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added and the assignments fixed up.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c

index 00ada399aee6ffa91f099963ed953bfdb5735c9c..c826ec045a365dcf633d7ea9e111c909ac8d300f 100644 (file)
@@ -1194,6 +1194,7 @@ EXPORT_SYMBOL(ath10k_core_start);
 int ath10k_wait_for_suspend(struct ath10k *ar, u32 suspend_opt)
 {
        int ret;
+       unsigned long time_left;
 
        reinit_completion(&ar->target_suspend);
 
@@ -1203,9 +1204,9 @@ int ath10k_wait_for_suspend(struct ath10k *ar, u32 suspend_opt)
                return ret;
        }
 
-       ret = wait_for_completion_timeout(&ar->target_suspend, 1 * HZ);
+       time_left = wait_for_completion_timeout(&ar->target_suspend, 1 * HZ);
 
-       if (ret == 0) {
+       if (!time_left) {
                ath10k_warn(ar, "suspend timed out - target pause event never came\n");
                return -ETIMEDOUT;
        }