diff mbox

ath10k: fix hwmon temperature input units

Message ID 1421128207-28641-1-git-send-email-rmanohar@qti.qualcomm.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Rajkumar Manoharan Jan. 13, 2015, 5:50 a.m. UTC
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>
---
 drivers/net/wireless/ath/ath10k/thermal.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kalle Valo Jan. 15, 2015, 10:36 a.m. UTC | #1
Rajkumar Manoharan <rmanohar@qti.qualcomm.com> writes:

> 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>

Thanks, applied.
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c
index b14ae8d..3c4a3d8 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", temperature * 1000);
 out:
 	mutex_unlock(&ar->conf_mutex);
 	return ret;