diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-30 14:50:44 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-30 14:50:44 -0800 |
commit | af5fdf80645304e7077ab876a43b325425c7ef70 (patch) | |
tree | f832bcdc45c60a7858b64f0a340cd10934c3eb9f /drivers/i2c/chips/tsl2550.c | |
parent | 07a6d5a49c985ae6111221b93b3a48772cc4b976 (diff) | |
parent | 4d29196c535088e807061ce2a0aa526daec2edfb (diff) |
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
at24: Use timeout also for read
i2c: Fix userspace_device list corruption
MAINTAINERS: Add missing i2c files
i2c/tsl2550: Fix lux value in extended mode
Diffstat (limited to 'drivers/i2c/chips/tsl2550.c')
-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 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); } |