diff options
author | Jean Delvare <jdelvare@suse.de> | 2015-09-01 16:07:41 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-01 22:03:59 (GMT) |
commit | d3d11fe08ccc9bff174fc958722b5661f0932486 (patch) | |
tree | 9d07265a7d2df0efe9d095b036d17348b431cd90 /drivers | |
parent | b6c6aedcbcbacd7b0cb4b64ed5ac835bc1c60a03 (diff) | |
download | linux-d3d11fe08ccc9bff174fc958722b5661f0932486.tar.xz |
tg3: Fix temperature reporting
The temperature registers appear to report values in degrees Celsius
while the hwmon API mandates values to be exposed in millidegrees
Celsius. Do the conversion so that the values reported by "sensors"
are correct.
Fixes: aed93e0bf493 ("tg3: Add hwmon support for temperature")
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Prashant Sreedharan <prashant@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
Cc: stable@vger.kernel.org [v3.6+]
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 73c934c..79789d8 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -10757,7 +10757,7 @@ static ssize_t tg3_show_temp(struct device *dev, tg3_ape_scratchpad_read(tp, &temperature, attr->index, sizeof(temperature)); spin_unlock_bh(&tp->lock); - return sprintf(buf, "%u\n", temperature); + return sprintf(buf, "%u\n", temperature * 1000); } |