summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/applesmc.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-21 16:37:27 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-21 16:37:27 +0100
commit77835492ed489c0b870f82f4c50687bd267acc0a (patch)
treed80903ce1b8dd30aa44ccfc756616ad4d6c74d63 /drivers/hwmon/applesmc.c
parentaf37501c792107c2bde1524bdae38d9a247b841a (diff)
parent1de9e8e70f5acc441550ca75433563d91b269bbe (diff)
downloadlinux-77835492ed489c0b870f82f4c50687bd267acc0a.tar.gz
linux-77835492ed489c0b870f82f4c50687bd267acc0a.tar.bz2
linux-77835492ed489c0b870f82f4c50687bd267acc0a.zip
Merge commit 'v2.6.29-rc2' into perfcounters/core
Conflicts: include/linux/syscalls.h
Diffstat (limited to 'drivers/hwmon/applesmc.c')
-rw-r--r--drivers/hwmon/applesmc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index dca47a591baf..e30186236588 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -590,6 +590,11 @@ static ssize_t applesmc_light_show(struct device *dev,
}
ret = applesmc_read_key(LIGHT_SENSOR_LEFT_KEY, buffer, data_length);
+ /* newer macbooks report a single 10-bit bigendian value */
+ if (data_length == 10) {
+ left = be16_to_cpu(*(__be16 *)(buffer + 6)) >> 2;
+ goto out;
+ }
left = buffer[2];
if (ret)
goto out;