From: Rajkumar Manoharan Date: Tue, 13 Jan 2015 07:14:24 +0000 (+0530) Subject: ath10k: fix hwmon temperature input units X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=6d48161678dcbeb1ac1736aaf11d10c55ed9a314;p=deliverable%2Flinux.git ath10k: fix hwmon temperature input units To be compliant with the hwmon interface the unit needs to be millidegree Celsius. Fix that. Reported-by: Matthias Kaehlcke Signed-off-by: Rajkumar Manoharan Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c index 41cff50baa41..aede750809fe 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.c +++ b/drivers/net/wireless/ath/ath10k/thermal.c @@ -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;