summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/ds1621.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c
index 60bf502..5a2ea62 100644
--- a/drivers/hwmon/ds1621.c
+++ b/drivers/hwmon/ds1621.c
@@ -80,7 +80,7 @@ int dtt_read(int sensor, int reg)
/* Handle 2 byte result */
if (dlen == 2)
- return ((int)((short)data[1] + (((short)data[0]) << 8)));
+ return (short)((data[0] << 8) | data[1]);
return (int)data[0];
}