iio: light: ltr501: Powerdown device on error
authorCristina Opriceana <cristina.opriceana@gmail.com>
Wed, 1 Apr 2015 15:50:17 +0000 (18:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2015 08:27:39 +0000 (10:27 +0200)
commit1ca510b0ea6da1a4ff3a385f0613e045f670304e
treeb7e58e65e0c1f5b433cf8d1d22a496e1af7013bf
parentc471c989addf4d806c62ece60d6cfd6d9ad50c95
iio: light: ltr501: Powerdown device on error

Power down device when an error occurs  in order to avoid wasting
power. Move powerdown function up to be seen by the new call and
align parameters for the ltr501_write_contr() call.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/light/ltr501.c