iio: light: isl29028: return zero in write_raw() on success

isl29028_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 isl29028_write_raw() always return zero
on success.

Fixes: 2db5054ac2 ("staging: iio: isl29028: 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:
Sang-Heon Jeon 2026-07-28 03:47:38 +09:00 committed by Jonathan Cameron
parent 512d321b93
commit 55b7562282

View File

@ -409,7 +409,7 @@ static int isl29028_write_raw(struct iio_dev *indio_dev,
if (ret < 0)
return ret;
return ret;
return 0;
}
static int isl29028_read_raw(struct iio_dev *indio_dev,