mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 12:35:52 +02:00
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>
This commit is contained in:
parent
04392fa8af
commit
122679a62f
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user