diff options
author | Julien Stephan <jstephan@baylibre.com> | 2024-10-31 16:26:59 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-11-03 20:33:43 +0000 |
commit | 63023e8aa3e8353d9bd2302196bbd9da5d8d0bef (patch) | |
tree | d33d3e3b93227e3662718509e00174360c0df6a2 /drivers/iio | |
parent | e41edccbfc34d2fd4f2c52a9159ed4f429d419f5 (diff) | |
download | linux-stable-63023e8aa3e8353d9bd2302196bbd9da5d8d0bef.tar.gz linux-stable-63023e8aa3e8353d9bd2302196bbd9da5d8d0bef.tar.bz2 linux-stable-63023e8aa3e8353d9bd2302196bbd9da5d8d0bef.zip |
iio: proximity: irsd200: simplify code in write_event_config callback
iio_ev_state_store is actually using kstrtobool to check user
input, then gives the converted boolean value to the write_event_config
callback.
Remove useless code in write_event_config callback.
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20241031-iio-fix-write-event-config-signature-v2-4-2bcacbb517a2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/proximity/irsd200.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/proximity/irsd200.c b/drivers/iio/proximity/irsd200.c index 6e96b764fed8..fb0691da99ee 100644 --- a/drivers/iio/proximity/irsd200.c +++ b/drivers/iio/proximity/irsd200.c @@ -662,7 +662,7 @@ static int irsd200_write_event_config(struct iio_dev *indio_dev, return ret; return regmap_field_write( - data->regfields[IRS_REGF_INTR_COUNT_THR_OR], !!state); + data->regfields[IRS_REGF_INTR_COUNT_THR_OR], state); default: return -EINVAL; } |