mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 09:41:03 +02:00
iio: light: tsl2583: return zero in write_raw() on success
tsl2583_write_raw() returns the value of pm_runtime_put_autosuspend(),
which is 1 if the device is already runtime suspended.
In that case write() on the sysfs attribute returns 1 instead of the
number of bytes written. Make tsl2583_write_raw() always return zero
on success.
Fixes: 371894f5d1 ("iio: tsl2583: add runtime power management support")
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
This commit is contained in:
parent
55b7562282
commit
42e8791841
|
|
@ -794,7 +794,7 @@ static int tsl2583_write_raw(struct iio_dev *indio_dev,
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct iio_info tsl2583_info = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user