aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-09-25 10:45:03 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 17:02:07 -0400
commitcb929eae78ec0b243dbf58039bce4af354f6020c (patch)
treebdd5d708bac06c95c4ff067ff8f21688e9b31143 /drivers/hwmon
parent709439a284bc5b7d42a70fee7119feb186c1ca99 (diff)
[PATCH] hwmon: Minor w83l785ts optimization
Using s8 instead of u8 to store temperature register values saves a few instructions on sysfs file read. The very same was done for several other drivers a while ago (lm63, lm83, lm90...) Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> drivers/hwmon/w83l785ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/w83l785ts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/w83l785ts.c b/drivers/hwmon/w83l785ts.c
index fcb2c39b04fd..db12a620b331 100644
--- a/drivers/hwmon/w83l785ts.c
+++ b/drivers/hwmon/w83l785ts.c
@@ -74,7 +74,7 @@ I2C_CLIENT_INSMOD_1(w83l785ts);
74 * The W83L785TS-S uses signed 8-bit values. 74 * The W83L785TS-S uses signed 8-bit values.
75 */ 75 */
76 76
77#define TEMP_FROM_REG(val) ((val & 0x80 ? val-0x100 : val) * 1000) 77#define TEMP_FROM_REG(val) ((val) * 1000)
78 78
79/* 79/*
80 * Functions declaration 80 * Functions declaration
@@ -112,7 +112,7 @@ struct w83l785ts_data {
112 unsigned long last_updated; /* in jiffies */ 112 unsigned long last_updated; /* in jiffies */
113 113
114 /* registers values */ 114 /* registers values */
115 u8 temp[2]; /* 0: input 115 s8 temp[2]; /* 0: input
116 1: critical limit */ 116 1: critical limit */
117}; 117};
118 118