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: light: tsl2772: 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-3-2bcacbb517a2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Julien Stephan and committed by
Jonathan Cameron
e41edccb 122679a6

+2 -2
+2 -2
drivers/iio/light/tsl2772.c
··· 1086 1086 struct tsl2772_chip *chip = iio_priv(indio_dev); 1087 1087 1088 1088 if (chan->type == IIO_INTENSITY) 1089 - chip->settings.als_interrupt_en = val ? true : false; 1089 + chip->settings.als_interrupt_en = val; 1090 1090 else 1091 - chip->settings.prox_interrupt_en = val ? true : false; 1091 + chip->settings.prox_interrupt_en = val; 1092 1092 1093 1093 return tsl2772_invoke_change(indio_dev); 1094 1094 }