mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-18 13:48:16 -04:00
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>
This commit is contained in:
committed by
Jonathan Cameron
parent
e41edccbfc
commit
63023e8aa3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user