Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Julien Stephan and committed by
Jonathan Cameron
122679a6 04392fa8

+1 -1
+1 -1
drivers/iio/proximity/hx9023s.c
··· 879 879 struct hx9023s_data *data = iio_priv(indio_dev); 880 880 881 881 if (test_bit(chan->channel, &data->chan_in_use)) { 882 - hx9023s_ch_en(data, chan->channel, !!state); 882 + hx9023s_ch_en(data, chan->channel, state); 883 883 __assign_bit(chan->channel, &data->chan_event, 884 884 data->ch_data[chan->channel].enable); 885 885 }