OSDN Git Service

ath10k: fix hwmon temperature input units
authorRajkumar Manoharan <rmanohar@qti.qualcomm.com>
Tue, 13 Jan 2015 07:14:24 +0000 (12:44 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 15 Jan 2015 10:36:34 +0000 (12:36 +0200)
To be compliant with the hwmon interface the unit needs to be
millidegree Celsius. Fix that.

Reported-by: Matthias Kaehlcke <mka@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/thermal.c

index 41cff50..aede750 100644 (file)
@@ -160,7 +160,8 @@ static ssize_t ath10k_thermal_show_temp(struct device *dev,
        temperature = ar->thermal.temperature;
        spin_unlock_bh(&ar->data_lock);
 
-       ret = snprintf(buf, PAGE_SIZE, "%d", temperature);
+       /* display in millidegree celcius */
+       ret = snprintf(buf, PAGE_SIZE, "%d\n", temperature * 1000);
 out:
        mutex_unlock(&ar->conf_mutex);
        return ret;