summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorJulien Stephan <jstephan@baylibre.com>2024-10-31 16:26:57 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-11-03 20:33:43 +0000
commit122679a62f2446b44a35aa8b54cb0240e0a5dab0 (patch)
tree40e2667467b35fc092b2495a5730f52f739683d5 /drivers/iio
parent04392fa8af5ae770469abb7c032109ce33075ce1 (diff)
downloadlinux-stable-122679a62f2446b44a35aa8b54cb0240e0a5dab0.tar.gz
linux-stable-122679a62f2446b44a35aa8b54cb0240e0a5dab0.tar.bz2
linux-stable-122679a62f2446b44a35aa8b54cb0240e0a5dab0.zip
iio: proximity: hx9023s: 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-2-2bcacbb517a2@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/proximity/hx9023s.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/proximity/hx9023s.c b/drivers/iio/proximity/hx9023s.c
index d8fb34060d3d..38441b1ee040 100644
--- a/drivers/iio/proximity/hx9023s.c
+++ b/drivers/iio/proximity/hx9023s.c
@@ -879,7 +879,7 @@ static int hx9023s_write_event_config(struct iio_dev *indio_dev,
struct hx9023s_data *data = iio_priv(indio_dev);
if (test_bit(chan->channel, &data->chan_in_use)) {
- hx9023s_ch_en(data, chan->channel, !!state);
+ hx9023s_ch_en(data, chan->channel, state);
__assign_bit(chan->channel, &data->chan_event,
data->ch_data[chan->channel].enable);
}