aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/applesmc.c
diff options
context:
space:
mode:
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,
590 } 590 }
591 591
592 ret = applesmc_read_key(LIGHT_SENSOR_LEFT_KEY, buffer, data_length); 592 ret = applesmc_read_key(LIGHT_SENSOR_LEFT_KEY, buffer, data_length);
593 /* newer macbooks report a single 10-bit bigendian value */
594 if (data_length == 10) {
595 left = be16_to_cpu(*(__be16 *)(buffer + 6)) >> 2;
596 goto out;
597 }
593 left = buffer[2]; 598 left = buffer[2];
594 if (ret) 599 if (ret)
595 goto out; 600 goto out;