tg3: Fix temperature reporting
authorJean Delvare <jdelvare@suse.de>
Tue, 1 Sep 2015 16:07:41 +0000 (18:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2015 10:07:28 +0000 (12:07 +0200)
commitf4487c483c26c0374450e0e910a45a7c0e91407d
tree154fd187486ec6b9bf5d7dd100cfab8a261e2d37
parentf04fce5fcb1a6de2cf2f80c414ec9f16dbb15f6e
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>
drivers/net/ethernet/broadcom/tg3.c