diff options
author | Jean Delvare <jdelvare@suse.de> | 2015-09-01 18:07:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-01 11:36:09 +0200 |
commit | 6c53b52eab4a3a98e59c1b9f98578d1a8a35a6ef (patch) | |
tree | 11f05f06721a48ad106f840cd4b201e31649e566 /drivers/net/ethernet | |
parent | a4e80afe2e9d0bcdedb1c3811066b87ff9634ca6 (diff) | |
download | lwn-6c53b52eab4a3a98e59c1b9f98578d1a8a35a6ef.tar.gz lwn-6c53b52eab4a3a98e59c1b9f98578d1a8a35a6ef.zip |
tg3: Fix temperature reporting
commit d3d11fe08ccc9bff174fc958722b5661f0932486 upstream.
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet')
-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 bc65dc85a622..91e7286ab1e1 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -10737,7 +10737,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); } |