iio:light:ltr501: fix variable in ltr501_init
authorHartmut Knaack <knaack.h@gmx.de>
Sun, 28 Jun 2015 10:31:53 +0000 (12:31 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 19 Jul 2015 10:48:16 +0000 (11:48 +0100)
commitfe5adb917431aafe1324a2455634ed59147df807
tree3a050e8aa415bf58e0ff5858566f33386ff4d02b
parent0d1462de0b24fd09284411a3753f24a3d7c67577
iio:light:ltr501: fix variable in ltr501_init

When filling data->als_contr, the register content read into status needs
to be used, instead of the return status value of regmap_read.

Fixes: 8592a7eefa540 ("iio: ltr501: Add support for ltr559 chip")

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/light/ltr501.c