iio: cm36651: Changed return value of read function
Subsystems (2)
PATCH 1/1 iio: cm36651: Changed return value of read function
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).
--- drivers/iio/light/cm36651.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/light/cm36651.c +2 -2
@@ -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,
Signature · 6 lines
1.7.9.5 -- Best Regards, Beomho Seo, Assistant Engineer System S/W Lab., Software Center, Samsung Electronics
Quoted 7 lines · Beomho Seo
Hello,
I have fixed cm36651 driver.
Some return value of callback have been changed toIIO_VAL_INT.
If notIIO_VAL_INT, driver will print wrongvalue(*_read_int_time)or notprint(*_read_prox_thresh).Signed-off-by Beomho Seo <[email protected]>
Applied to the fixes-togreg branch of iio.git
This is going to cause a merge conflict with the reworking of the event handling in the togreg branch, but the solution is simple so shouldn't cause any problems (hopefully I'll remember to metion it when I send the pull requests!)
Quoted 27 lines
--- drivers/iio/light/cm36651.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iio/light/cm36651.c +2
-2@@ -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,
Quoted 7 lines · Jonathan Cameron
Quoted 6 lines · Beomho Seo
Hello,
I have fixed cm36651 driver.
Some return value of callback have been changed toIIO_VAL_INT.
If notIIO_VAL_INT, driver will print wrongvalue(*_read_int_time)or notprint(*_read_prox_thresh).
Quoted 7 lines
Quoted 1 line
Signed-off-by Beomho Seo <[email protected]>Applied to the fixes-togreg branch of iio.git
This is going to cause a merge conflict with the reworking of the event handling in the togreg branch, but the solution is simple so shouldn't cause any problems (hopefully I'll remember to metion it when I send the pull requests!)
Actually the patch should be split into two parts. The first hunk is a fix for the a problem which is already present in the current (as in Linus tree) version of the driver. While the problem, which is fixed in the second hunk, is something I introduced with the conversion to the new style event interface. So only the first part should go to fixes-togreg and the second to togreg. I don't think there will be any conflicts that way.
- Lars
Quoted 32 lines
Quoted 19 lines
--- drivers/iio/light/cm36651.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iio/light/cm36651.c +1
-1@@ -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,drivers/iio/light/cm36651.c static int cm36651_read_prox_thresh(struct iio_dev *indio_dev, · line 500
Quoted 8 lines
drivers/iio/light/cm36651.c +1
-1@@ -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,--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonathan Cameron
maintainerQuoted 16 lines · Lars-Peter Clausen
Quoted 7 lines · Jonathan Cameron
Quoted 6 lines · Beomho Seo
Hello,
I have fixed cm36651 driver.
Some return value of callback have been changed toIIO_VAL_INT.
If notIIO_VAL_INT, driver will print wrongvalue(*_read_int_time)or notprint(*_read_prox_thresh).Quoted 7 lines
Quoted 1 line
Signed-off-by Beomho Seo <[email protected]>Applied to the fixes-togreg branch of iio.git
This is going to cause a merge conflict with the reworking of the event handling in the togreg branch, but the solution is simple so shouldn't cause any problems (hopefully I'll remember to metion it when I send the pull requests!)
Quoted 7 lines
Actually the patch should be split into two parts. The first hunk is a fix for the a problem which is already present in the current (as in Linus tree) version of the driver. While the problem, which is fixed in the second hunk, is something I introduced with the conversion to the new style event interface. So only the first part should go to fixes-togreg and the second to togreg. I don't think there will be any conflicts that way.
Ah, good point.
Anyhow, I've switched the original patch for one that only does the first change. Will deal with the second one when I have a bored moment.
Jonathan
Quoted 35 lines
- Lars
Quoted 32 lines
Quoted 19 lines
--- drivers/iio/light/cm36651.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iio/light/cm36651.c +1
-1@@ -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,drivers/iio/light/cm36651.c static int cm36651_read_prox_thresh(struct iio_dev *indio_dev, · line 500
Quoted 8 lines
drivers/iio/light/cm36651.c +1
-1@@ -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,--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html