]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ath10k: thermal: match wait_for_completion_timeout return type
authorNicholas Mc Guire <hofrat@osadl.org>
Mon, 30 Mar 2015 12:39:20 +0000 (15:39 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 1 Apr 2015 17:16:59 +0000 (20:16 +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/thermal.c

index c48c71d99b34748343b26b955269d86ca3751247..01bae867cae91d7a2d4dc947dc17cd2387ef3588 100644 (file)
@@ -75,6 +75,7 @@ static ssize_t ath10k_thermal_show_temp(struct device *dev,
 {
        struct ath10k *ar = dev_get_drvdata(dev);
        int ret, temperature;
+       unsigned long time_left;
 
        mutex_lock(&ar->conf_mutex);
 
@@ -96,9 +97,9 @@ static ssize_t ath10k_thermal_show_temp(struct device *dev,
                goto out;
        }
 
-       ret = wait_for_completion_timeout(&ar->thermal.wmi_sync,
-                                         ATH10K_THERMAL_SYNC_TIMEOUT_HZ);
-       if (ret == 0) {
+       time_left = wait_for_completion_timeout(&ar->thermal.wmi_sync,
+                                               ATH10K_THERMAL_SYNC_TIMEOUT_HZ);
+       if (!time_left) {
                ath10k_warn(ar, "failed to synchronize thermal read\n");
                ret = -ETIMEDOUT;
                goto out;