projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04392fa
)
iio: proximity: hx9023s: simplify code in write_event_config callback
author
Julien Stephan
<jstephan@baylibre.com>
Thu, 31 Oct 2024 15:26:57 +0000
(16:26 +0100)
committer
Jonathan Cameron
<Jonathan.Cameron@huawei.com>
Sun, 3 Nov 2024 20:33:43 +0000
(20:33 +0000)
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>
drivers/iio/proximity/hx9023s.c
patch
|
blob
|
history
diff --git
a/drivers/iio/proximity/hx9023s.c
b/drivers/iio/proximity/hx9023s.c
index
d8fb340
..
38441b1
100644
(file)
--- 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);
}