aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/chips/tsl2550.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-12-06 16:06:11 +0100
committerRafael J. Wysocki <rjw@sisk.pl>2009-12-06 16:06:11 +0100
commit64357ed468025614d48daa6cc87674ae5616f8fb (patch)
tree2467c239364d7602755b73203025d329c6f84b22 /drivers/i2c/chips/tsl2550.c
parentbe404f0212ffa8f67361f8ee460a25d901d88991 (diff)
parent6ec22f9b037fc0c2e00ddb7023fad279c365324d (diff)
Merge branch 'master' into for-linus
Diffstat (limited to 'drivers/i2c/chips/tsl2550.c')
-rw-r--r--drivers/i2c/chips/tsl2550.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/chips/tsl2550.c b/drivers/i2c/chips/tsl2550.c
index aa96bd2d27e..a0702f36a72 100644
--- a/drivers/i2c/chips/tsl2550.c
+++ b/drivers/i2c/chips/tsl2550.c
@@ -257,6 +257,7 @@ static DEVICE_ATTR(operating_mode, S_IWUSR | S_IRUGO,
static ssize_t __tsl2550_show_lux(struct i2c_client *client, char *buf)
{
+ struct tsl2550_data *data = i2c_get_clientdata(client);
u8 ch0, ch1;
int ret;
@@ -274,6 +275,8 @@ static ssize_t __tsl2550_show_lux(struct i2c_client *client, char *buf)
ret = tsl2550_calculate_lux(ch0, ch1);
if (ret < 0)
return ret;
+ if (data->operating_mode == 1)
+ ret *= 5;
return sprintf(buf, "%d\n", ret);
}