diff options
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/chips/tsl2550.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/chips/tsl2550.c b/drivers/i2c/chips/tsl2550.c index aa96bd2d27ea..a0702f36a72f 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, | |||
257 | 257 | ||
258 | static ssize_t __tsl2550_show_lux(struct i2c_client *client, char *buf) | 258 | static ssize_t __tsl2550_show_lux(struct i2c_client *client, char *buf) |
259 | { | 259 | { |
260 | struct tsl2550_data *data = i2c_get_clientdata(client); | ||
260 | u8 ch0, ch1; | 261 | u8 ch0, ch1; |
261 | int ret; | 262 | int ret; |
262 | 263 | ||
@@ -274,6 +275,8 @@ static ssize_t __tsl2550_show_lux(struct i2c_client *client, char *buf) | |||
274 | ret = tsl2550_calculate_lux(ch0, ch1); | 275 | ret = tsl2550_calculate_lux(ch0, ch1); |
275 | if (ret < 0) | 276 | if (ret < 0) |
276 | return ret; | 277 | return ret; |
278 | if (data->operating_mode == 1) | ||
279 | ret *= 5; | ||
277 | 280 | ||
278 | return sprintf(buf, "%d\n", ret); | 281 | return sprintf(buf, "%d\n", ret); |
279 | } | 282 | } |