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: apds9306: simplifies if branch in apds9306_write_event_config

Simplifies the regmap_wite if branch in apds9306_write_event_config.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20241031-iio-fix-write-event-config-signature-v2-13-2bcacbb517a2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Julien Stephan and committed by
Jonathan Cameron
86b8843e ad531aa4

+1 -4
+1 -4
drivers/iio/light/apds9306.c
··· 1125 1125 } 1126 1126 } 1127 1127 case IIO_EV_TYPE_THRESH_ADAPTIVE: 1128 - if (state) 1129 - return regmap_field_write(rf->int_thresh_var_en, 1); 1130 - else 1131 - return regmap_field_write(rf->int_thresh_var_en, 0); 1128 + return regmap_field_write(rf->int_thresh_var_en, state); 1132 1129 default: 1133 1130 return -EINVAL; 1134 1131 }