[PATCH] iio: cm36651: Changed return value of read function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have fixed cm36651 driver.
Some return value of callback have been changed to IIO_VAL_INT.
If not IIO_VAL_INT, driver will print wrong value(*_read_int_time) or not print(*_read_prox_thresh).

Signed-off-by: Beomho Seo <beomho.seo@xxxxxxxxxxx>
---
 drivers/iio/light/cm36651.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/light/cm36651.c b/drivers/iio/light/cm36651.c
index 21df571..0206eab 100644
--- a/drivers/iio/light/cm36651.c
+++ b/drivers/iio/light/cm36651.c
@@ -387,7 +387,7 @@ static int cm36651_read_int_time(struct cm36651_data *cm36651,
 		return -EINVAL;
 	}

-	return IIO_VAL_INT_PLUS_MICRO;
+	return IIO_VAL_INT;
 }

 static int cm36651_write_int_time(struct cm36651_data *cm36651,
@@ -494,7 +494,7 @@ static int cm36651_read_prox_thresh(struct iio_dev *indio_dev,

 	*val = cm36651->ps_ctrl_regs[CM36651_PS_THD];

-	return 0;
+	return IIO_VAL_INT;
 }

 static int cm36651_write_prox_thresh(struct iio_dev *indio_dev,
-- 
1.7.9.5
-- 
Best Regards,

Beomho Seo, Assistant Engineer
System S/W Lab., Software Center, Samsung Electronics
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux