hwmon: (max16065) Fix current calculation
PATCH 1/1 hwmon: (max16065) Fix current calculation
Current calculation is completely wrong. Add missing brackets to fix it.
---
Candidate for stable (2.6.39+).
drivers/hwmon/max16065.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/hwmon/max16065.c +1 -1
@@ -124,7 +124,7 @@ static inline int MV_TO_LIMIT(int mv, int range)static inline int ADC_TO_CURR (int adc,int gain) { -return adc *1400000 / gain *255 ; +return adc *1400000 / (gain *255 ); }/*
Signature · 7 lines
1.7.3.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 14 lines · Guenter Roeck
Current calculation is completely wrong. Add missing brackets to fix it.
Signed-off-by Guenter Roeck <[email protected]>---
Candidate for stable (2.6.39+).drivers/hwmon/max16065.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/hwmon/max16065.c +0
-0
drivers/hwmon/max16065.c static inline int MV_TO_LIMIT(int mv, int range) · line 130
Quoted 8 lines
drivers/hwmon/max16065.c +1
-1@@ -124,7 +124,7 @@ static inline int MV_TO_LIMIT(int mv, int range)static inline int ADC_TO_CURR (int adc,int gain) { -return adc *1400000 / gain *255 ; +return adc *1400000 / (gain *255 ); }/*
Good catch.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 22 lines · Jean Delvare
Quoted 21 lines · Guenter Roeck
Current calculation is completely wrong. Add missing brackets to fix it.
Signed-off-by Guenter Roeck <[email protected]>---
Candidate for stable (2.6.39+).drivers/hwmon/max16065.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/hwmon/max16065.c +1
-1@@ -124,7 +124,7 @@ static inline int MV_TO_LIMIT(int mv, int range)static inline int ADC_TO_CURR (int adc,int gain) { -return adc *1400000 / gain *255 ; +return adc *1400000 / (gain *255 ); }
Quoted 6 lines
drivers/hwmon/max16065.c static inline int MV_TO_LIMIT(int mv, int range) · line 130
Quoted 1 line
drivers/hwmon/max16065.c +0
-0/* Good catch.
Acked-by Jean Delvare <[email protected]>
I'd call it embarrassing not to have caught it earlier ...
Thanks a lot for the review!
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors