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: fix write_event_config signature

write_event_config callback use an int for state, but it is actually a
boolean. iio_ev_state_store is actually using kstrtobool to check user
input, then gives the converted boolean value to write_event_config.

Fix signature and update all iio drivers to use the new signature.

This patch has been partially written using coccinelle with the
following script:

$ cat iio-bool.cocci
// Options: --all-includes

virtual patch

@c1@
identifier iioinfo;
identifier wecfunc;
@@
static const struct iio_info iioinfo = {
...,
.write_event_config =
(
wecfunc
|
&wecfunc
),
...,
};

@@
identifier c1.wecfunc;
identifier indio_dev, chan, type, dir, state;
@@
int wecfunc(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir,
-int
+bool
state) {
...
}

make coccicheck MODE=patch COCCI=iio-bool.cocci M=drivers/iio

Unfortunately, this script didn't match all files:
* all write_event_config callbacks using iio_device_claim_direct_scoped
were not detected and not patched.
* all files that do not assign and declare the write_event_config
callback in the same file.

iio.h was also manually updated.

The patch was build tested using allmodconfig config.

cc: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20241031-iio-fix-write-event-config-signature-v2-7-2bcacbb517a2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Julien Stephan and committed by
Jonathan Cameron
b4b42f28 2cc86e94

+72 -66
+1 -1
drivers/iio/accel/adxl367.c
··· 1073 1073 const struct iio_chan_spec *chan, 1074 1074 enum iio_event_type type, 1075 1075 enum iio_event_direction dir, 1076 - int state) 1076 + bool state) 1077 1077 { 1078 1078 enum adxl367_activity_type act; 1079 1079
+1 -1
drivers/iio/accel/adxl372.c
··· 940 940 941 941 static int adxl372_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, 942 942 enum iio_event_type type, enum iio_event_direction dir, 943 - int state) 943 + bool state) 944 944 { 945 945 struct adxl372_state *st = iio_priv(indio_dev); 946 946
+1 -1
drivers/iio/accel/adxl380.c
··· 1386 1386 const struct iio_chan_spec *chan, 1387 1387 enum iio_event_type type, 1388 1388 enum iio_event_direction dir, 1389 - int state) 1389 + bool state) 1390 1390 { 1391 1391 struct adxl380_state *st = iio_priv(indio_dev); 1392 1392 enum adxl380_axis axis;
+1 -1
drivers/iio/accel/bma400_core.c
··· 1293 1293 static int bma400_write_event_config(struct iio_dev *indio_dev, 1294 1294 const struct iio_chan_spec *chan, 1295 1295 enum iio_event_type type, 1296 - enum iio_event_direction dir, int state) 1296 + enum iio_event_direction dir, bool state) 1297 1297 { 1298 1298 struct bma400_data *data = iio_priv(indio_dev); 1299 1299 int ret;
+1 -1
drivers/iio/accel/bmc150-accel-core.c
··· 804 804 const struct iio_chan_spec *chan, 805 805 enum iio_event_type type, 806 806 enum iio_event_direction dir, 807 - int state) 807 + bool state) 808 808 { 809 809 struct bmc150_accel_data *data = iio_priv(indio_dev); 810 810 int ret;
+1 -1
drivers/iio/accel/fxls8962af-core.c
··· 617 617 fxls8962af_write_event_config(struct iio_dev *indio_dev, 618 618 const struct iio_chan_spec *chan, 619 619 enum iio_event_type type, 620 - enum iio_event_direction dir, int state) 620 + enum iio_event_direction dir, bool state) 621 621 { 622 622 struct fxls8962af_data *data = iio_priv(indio_dev); 623 623 u8 enable_event, enable_bits;
+1 -1
drivers/iio/accel/kxcjk-1013.c
··· 1081 1081 const struct iio_chan_spec *chan, 1082 1082 enum iio_event_type type, 1083 1083 enum iio_event_direction dir, 1084 - int state) 1084 + bool state) 1085 1085 { 1086 1086 struct kxcjk1013_data *data = iio_priv(indio_dev); 1087 1087 int ret;
+1 -1
drivers/iio/accel/mma8452.c
··· 974 974 const struct iio_chan_spec *chan, 975 975 enum iio_event_type type, 976 976 enum iio_event_direction dir, 977 - int state) 977 + bool state) 978 978 { 979 979 struct mma8452_data *data = iio_priv(indio_dev); 980 980 int val, ret;
+1 -1
drivers/iio/accel/mma9551.c
··· 225 225 const struct iio_chan_spec *chan, 226 226 enum iio_event_type type, 227 227 enum iio_event_direction dir, 228 - int state) 228 + bool state) 229 229 { 230 230 struct mma9551_data *data = iio_priv(indio_dev); 231 231 int ret;
+2 -1
drivers/iio/accel/mma9553.c
··· 725 725 static int mma9553_write_event_config(struct iio_dev *indio_dev, 726 726 const struct iio_chan_spec *chan, 727 727 enum iio_event_type type, 728 - enum iio_event_direction dir, int state) 728 + enum iio_event_direction dir, 729 + bool state) 729 730 { 730 731 struct mma9553_data *data = iio_priv(indio_dev); 731 732 struct mma9553_event *event;
+1 -1
drivers/iio/accel/sca3000.c
··· 1253 1253 const struct iio_chan_spec *chan, 1254 1254 enum iio_event_type type, 1255 1255 enum iio_event_direction dir, 1256 - int state) 1256 + bool state) 1257 1257 { 1258 1258 struct sca3000_state *st = iio_priv(indio_dev); 1259 1259 int ret;
+2 -1
drivers/iio/adc/ad7091r-base.c
··· 150 150 static int ad7091r_write_event_config(struct iio_dev *indio_dev, 151 151 const struct iio_chan_spec *chan, 152 152 enum iio_event_type type, 153 - enum iio_event_direction dir, int state) 153 + enum iio_event_direction dir, 154 + bool state) 154 155 { 155 156 struct ad7091r_state *st = iio_priv(indio_dev); 156 157
+1 -1
drivers/iio/adc/ad7291.c
··· 269 269 const struct iio_chan_spec *chan, 270 270 enum iio_event_type type, 271 271 enum iio_event_direction dir, 272 - int state) 272 + bool state) 273 273 { 274 274 int ret = 0; 275 275 struct ad7291_chip_info *chip = iio_priv(indio_dev);
+1 -1
drivers/iio/adc/ad799x.c
··· 406 406 const struct iio_chan_spec *chan, 407 407 enum iio_event_type type, 408 408 enum iio_event_direction dir, 409 - int state) 409 + bool state) 410 410 { 411 411 struct ad799x_state *st = iio_priv(indio_dev); 412 412 int ret;
+1 -1
drivers/iio/adc/hi8435.c
··· 132 132 static int hi8435_write_event_config(struct iio_dev *idev, 133 133 const struct iio_chan_spec *chan, 134 134 enum iio_event_type type, 135 - enum iio_event_direction dir, int state) 135 + enum iio_event_direction dir, bool state) 136 136 { 137 137 struct hi8435_priv *priv = iio_priv(idev); 138 138 int ret;
+1 -1
drivers/iio/adc/max1363.c
··· 944 944 945 945 static int max1363_write_event_config(struct iio_dev *indio_dev, 946 946 const struct iio_chan_spec *chan, enum iio_event_type type, 947 - enum iio_event_direction dir, int state) 947 + enum iio_event_direction dir, bool state) 948 948 { 949 949 struct max1363_state *st = iio_priv(indio_dev); 950 950
+2 -1
drivers/iio/adc/pac1921.c
··· 699 699 static int pac1921_write_event_config(struct iio_dev *indio_dev, 700 700 const struct iio_chan_spec *chan, 701 701 enum iio_event_type type, 702 - enum iio_event_direction dir, int state) 702 + enum iio_event_direction dir, 703 + bool state) 703 704 { 704 705 struct pac1921_priv *priv = iio_priv(indio_dev); 705 706 u8 ovf_bit;
+1 -1
drivers/iio/adc/palmas_gpadc.c
··· 676 676 const struct iio_chan_spec *chan, 677 677 enum iio_event_type type, 678 678 enum iio_event_direction dir, 679 - int state) 679 + bool state) 680 680 { 681 681 struct palmas_gpadc *adc = iio_priv(indio_dev); 682 682 int adc_chan = chan->channel;
+1 -1
drivers/iio/adc/ti-ads1015.c
··· 806 806 807 807 static int ads1015_write_event_config(struct iio_dev *indio_dev, 808 808 const struct iio_chan_spec *chan, enum iio_event_type type, 809 - enum iio_event_direction dir, int state) 809 + enum iio_event_direction dir, bool state) 810 810 { 811 811 struct ads1015_data *data = iio_priv(indio_dev); 812 812 int ret;
+1 -1
drivers/iio/adc/xilinx-ams.c
··· 905 905 const struct iio_chan_spec *chan, 906 906 enum iio_event_type type, 907 907 enum iio_event_direction dir, 908 - int state) 908 + bool state) 909 909 { 910 910 struct ams *ams = iio_priv(indio_dev); 911 911 unsigned int alarm;
+1 -1
drivers/iio/adc/xilinx-xadc-events.c
··· 121 121 122 122 int xadc_write_event_config(struct iio_dev *indio_dev, 123 123 const struct iio_chan_spec *chan, enum iio_event_type type, 124 - enum iio_event_direction dir, int state) 124 + enum iio_event_direction dir, bool state) 125 125 { 126 126 unsigned int alarm = xadc_get_alarm_mask(chan); 127 127 struct xadc *xadc = iio_priv(indio_dev);
+1 -1
drivers/iio/adc/xilinx-xadc.h
··· 25 25 enum iio_event_direction dir); 26 26 int xadc_write_event_config(struct iio_dev *indio_dev, 27 27 const struct iio_chan_spec *chan, enum iio_event_type type, 28 - enum iio_event_direction dir, int state); 28 + enum iio_event_direction dir, bool state); 29 29 int xadc_read_event_value(struct iio_dev *indio_dev, 30 30 const struct iio_chan_spec *chan, enum iio_event_type type, 31 31 enum iio_event_direction dir, enum iio_event_info info,
+1 -1
drivers/iio/cdc/ad7150.c
··· 232 232 static int ad7150_write_event_config(struct iio_dev *indio_dev, 233 233 const struct iio_chan_spec *chan, 234 234 enum iio_event_type type, 235 - enum iio_event_direction dir, int state) 235 + enum iio_event_direction dir, bool state) 236 236 { 237 237 struct ad7150_chip_info *chip = iio_priv(indio_dev); 238 238 int ret = 0;
+1 -1
drivers/iio/dac/ad5421.c
··· 384 384 385 385 static int ad5421_write_event_config(struct iio_dev *indio_dev, 386 386 const struct iio_chan_spec *chan, enum iio_event_type type, 387 - enum iio_event_direction dir, int state) 387 + enum iio_event_direction dir, bool state) 388 388 { 389 389 struct ad5421_state *st = iio_priv(indio_dev); 390 390 unsigned int mask;
+1 -1
drivers/iio/dac/ad8460.c
··· 573 573 static int ad8460_write_event_config(struct iio_dev *indio_dev, 574 574 const struct iio_chan_spec *chan, 575 575 enum iio_event_type type, 576 - enum iio_event_direction dir, int val) 576 + enum iio_event_direction dir, bool val) 577 577 { 578 578 struct ad8460_state *state = iio_priv(indio_dev); 579 579 int fault;
+1 -1
drivers/iio/dummy/iio_simple_dummy.h
··· 60 60 const struct iio_chan_spec *chan, 61 61 enum iio_event_type type, 62 62 enum iio_event_direction dir, 63 - int state); 63 + bool state); 64 64 65 65 int iio_simple_dummy_read_event_value(struct iio_dev *indio_dev, 66 66 const struct iio_chan_spec *chan,
+1 -1
drivers/iio/dummy/iio_simple_dummy_events.c
··· 53 53 const struct iio_chan_spec *chan, 54 54 enum iio_event_type type, 55 55 enum iio_event_direction dir, 56 - int state) 56 + bool state) 57 57 { 58 58 struct iio_dummy_state *st = iio_priv(indio_dev); 59 59
+1 -1
drivers/iio/gyro/bmg160_core.c
··· 748 748 const struct iio_chan_spec *chan, 749 749 enum iio_event_type type, 750 750 enum iio_event_direction dir, 751 - int state) 751 + bool state) 752 752 { 753 753 struct bmg160_data *data = iio_priv(indio_dev); 754 754 int ret;
+1 -1
drivers/iio/imu/bmi323/bmi323_core.c
··· 785 785 static int bmi323_write_event_config(struct iio_dev *indio_dev, 786 786 const struct iio_chan_spec *chan, 787 787 enum iio_event_type type, 788 - enum iio_event_direction dir, int state) 788 + enum iio_event_direction dir, bool state) 789 789 { 790 790 struct bmi323_data *data = iio_priv(indio_dev); 791 791
+1 -1
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
··· 1173 1173 const struct iio_chan_spec *chan, 1174 1174 enum iio_event_type type, 1175 1175 enum iio_event_direction dir, 1176 - int state) 1176 + bool state) 1177 1177 { 1178 1178 struct inv_mpu6050_state *st = iio_priv(indio_dev); 1179 1179
+1 -1
drivers/iio/imu/kmx61.c
··· 942 942 const struct iio_chan_spec *chan, 943 943 enum iio_event_type type, 944 944 enum iio_event_direction dir, 945 - int state) 945 + bool state) 946 946 { 947 947 struct kmx61_data *data = kmx61_get_data(indio_dev); 948 948 int ret = 0;
+1 -1
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
··· 1959 1959 st_lsm6dsx_write_event_config(struct iio_dev *iio_dev, 1960 1960 const struct iio_chan_spec *chan, 1961 1961 enum iio_event_type type, 1962 - enum iio_event_direction dir, int state) 1962 + enum iio_event_direction dir, bool state) 1963 1963 { 1964 1964 struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev); 1965 1965 struct st_lsm6dsx_hw *hw = sensor->hw;
+2 -1
drivers/iio/light/adux1020.c
··· 502 502 static int adux1020_write_event_config(struct iio_dev *indio_dev, 503 503 const struct iio_chan_spec *chan, 504 504 enum iio_event_type type, 505 - enum iio_event_direction dir, int state) 505 + enum iio_event_direction dir, 506 + bool state) 506 507 { 507 508 struct adux1020_data *data = iio_priv(indio_dev); 508 509 int ret, mask;
+1 -1
drivers/iio/light/apds9300.c
··· 321 321 322 322 static int apds9300_write_interrupt_config(struct iio_dev *indio_dev, 323 323 const struct iio_chan_spec *chan, enum iio_event_type type, 324 - enum iio_event_direction dir, int state) 324 + enum iio_event_direction dir, bool state) 325 325 { 326 326 struct apds9300_data *data = iio_priv(indio_dev); 327 327 int ret;
+1 -1
drivers/iio/light/apds9306.c
··· 1071 1071 const struct iio_chan_spec *chan, 1072 1072 enum iio_event_type type, 1073 1073 enum iio_event_direction dir, 1074 - int state) 1074 + bool state) 1075 1075 { 1076 1076 struct apds9306_data *data = iio_priv(indio_dev); 1077 1077 struct apds9306_regfields *rf = &data->rf;
+1 -1
drivers/iio/light/apds9960.c
··· 757 757 const struct iio_chan_spec *chan, 758 758 enum iio_event_type type, 759 759 enum iio_event_direction dir, 760 - int state) 760 + bool state) 761 761 { 762 762 struct apds9960_data *data = iio_priv(indio_dev); 763 763 int ret;
+1 -1
drivers/iio/light/bh1745.c
··· 638 638 static int bh1745_write_event_config(struct iio_dev *indio_dev, 639 639 const struct iio_chan_spec *chan, 640 640 enum iio_event_type type, 641 - enum iio_event_direction dir, int state) 641 + enum iio_event_direction dir, bool state) 642 642 { 643 643 struct bh1745_data *data = iio_priv(indio_dev); 644 644 int value;
+1 -1
drivers/iio/light/cm36651.c
··· 529 529 const struct iio_chan_spec *chan, 530 530 enum iio_event_type type, 531 531 enum iio_event_direction dir, 532 - int state) 532 + bool state) 533 533 { 534 534 struct cm36651_data *cm36651 = iio_priv(indio_dev); 535 535 int cmd, ret;
+1 -1
drivers/iio/light/gp2ap002.c
··· 340 340 const struct iio_chan_spec *chan, 341 341 enum iio_event_type type, 342 342 enum iio_event_direction dir, 343 - int state) 343 + bool state) 344 344 { 345 345 struct gp2ap002 *gp2ap002 = iio_priv(indio_dev); 346 346
+1 -1
drivers/iio/light/gp2ap020a00f.c
··· 1159 1159 const struct iio_chan_spec *chan, 1160 1160 enum iio_event_type type, 1161 1161 enum iio_event_direction dir, 1162 - int state) 1162 + bool state) 1163 1163 { 1164 1164 struct gp2ap020a00f_data *data = iio_priv(indio_dev); 1165 1165 enum gp2ap020a00f_cmd cmd;
+1 -1
drivers/iio/light/iqs621-als.c
··· 271 271 const struct iio_chan_spec *chan, 272 272 enum iio_event_type type, 273 273 enum iio_event_direction dir, 274 - int state) 274 + bool state) 275 275 { 276 276 struct iqs621_als_private *iqs621_als = iio_priv(indio_dev); 277 277 struct iqs62x_core *iqs62x = iqs621_als->iqs62x;
+1 -1
drivers/iio/light/ltr390.c
··· 553 553 const struct iio_chan_spec *chan, 554 554 enum iio_event_type type, 555 555 enum iio_event_direction dir, 556 - int state) 556 + bool state) 557 557 { 558 558 struct ltr390_data *data = iio_priv(indio_dev); 559 559 int ret;
+1 -1
drivers/iio/light/ltr501.c
··· 1077 1077 static int ltr501_write_event_config(struct iio_dev *indio_dev, 1078 1078 const struct iio_chan_spec *chan, 1079 1079 enum iio_event_type type, 1080 - enum iio_event_direction dir, int state) 1080 + enum iio_event_direction dir, bool state) 1081 1081 { 1082 1082 struct ltr501_data *data = iio_priv(indio_dev); 1083 1083 int ret;
+1 -1
drivers/iio/light/max44009.c
··· 422 422 const struct iio_chan_spec *chan, 423 423 enum iio_event_type type, 424 424 enum iio_event_direction dir, 425 - int state) 425 + bool state) 426 426 { 427 427 struct max44009_data *data = iio_priv(indio_dev); 428 428 int ret;
+1 -1
drivers/iio/light/opt3001.c
··· 634 634 635 635 static int opt3001_write_event_config(struct iio_dev *iio, 636 636 const struct iio_chan_spec *chan, enum iio_event_type type, 637 - enum iio_event_direction dir, int state) 637 + enum iio_event_direction dir, bool state) 638 638 { 639 639 struct opt3001 *opt = iio_priv(iio); 640 640 int ret;
+1 -1
drivers/iio/light/stk3310.c
··· 324 324 const struct iio_chan_spec *chan, 325 325 enum iio_event_type type, 326 326 enum iio_event_direction dir, 327 - int state) 327 + bool state) 328 328 { 329 329 int ret; 330 330 struct stk3310_data *data = iio_priv(indio_dev);
+1 -1
drivers/iio/light/tcs3472.c
··· 327 327 328 328 static int tcs3472_write_event_config(struct iio_dev *indio_dev, 329 329 const struct iio_chan_spec *chan, enum iio_event_type type, 330 - enum iio_event_direction dir, int state) 330 + enum iio_event_direction dir, bool state) 331 331 { 332 332 struct tcs3472_data *data = iio_priv(indio_dev); 333 333 int ret = 0;
+1 -1
drivers/iio/light/tsl2563.c
··· 630 630 631 631 static int tsl2563_write_interrupt_config(struct iio_dev *indio_dev, 632 632 const struct iio_chan_spec *chan, enum iio_event_type type, 633 - enum iio_event_direction dir, int state) 633 + enum iio_event_direction dir, bool state) 634 634 { 635 635 struct tsl2563_chip *chip = iio_priv(indio_dev); 636 636 int ret = 0;
+1 -1
drivers/iio/light/tsl2591.c
··· 985 985 const struct iio_chan_spec *chan, 986 986 enum iio_event_type type, 987 987 enum iio_event_direction dir, 988 - int state) 988 + bool state) 989 989 { 990 990 struct tsl2591_chip *chip = iio_priv(indio_dev); 991 991 struct i2c_client *client = chip->client;
+1 -1
drivers/iio/light/tsl2772.c
··· 1081 1081 const struct iio_chan_spec *chan, 1082 1082 enum iio_event_type type, 1083 1083 enum iio_event_direction dir, 1084 - int val) 1084 + bool val) 1085 1085 { 1086 1086 struct tsl2772_chip *chip = iio_priv(indio_dev); 1087 1087
+1 -1
drivers/iio/light/us5182d.c
··· 627 627 628 628 static int us5182d_write_event_config(struct iio_dev *indio_dev, 629 629 const struct iio_chan_spec *chan, enum iio_event_type type, 630 - enum iio_event_direction dir, int state) 630 + enum iio_event_direction dir, bool state) 631 631 { 632 632 struct us5182d_data *data = iio_priv(indio_dev); 633 633 int ret;
+3 -2
drivers/iio/light/vcnl4000.c
··· 1456 1456 const struct iio_chan_spec *chan, 1457 1457 enum iio_event_type type, 1458 1458 enum iio_event_direction dir, 1459 - int state) 1459 + bool state) 1460 1460 { 1461 1461 switch (chan->type) { 1462 1462 case IIO_PROXIMITY: ··· 1501 1501 static int vcnl4040_write_event_config(struct iio_dev *indio_dev, 1502 1502 const struct iio_chan_spec *chan, 1503 1503 enum iio_event_type type, 1504 - enum iio_event_direction dir, int state) 1504 + enum iio_event_direction dir, 1505 + bool state) 1505 1506 { 1506 1507 int ret = -EINVAL; 1507 1508 u16 val, mask;
+1 -1
drivers/iio/light/veml6030.c
··· 821 821 */ 822 822 static int veml6030_write_interrupt_config(struct iio_dev *indio_dev, 823 823 const struct iio_chan_spec *chan, enum iio_event_type type, 824 - enum iio_event_direction dir, int state) 824 + enum iio_event_direction dir, bool state) 825 825 { 826 826 int ret; 827 827 struct veml6030_data *data = iio_priv(indio_dev);
+1 -1
drivers/iio/position/iqs624-pos.c
··· 181 181 const struct iio_chan_spec *chan, 182 182 enum iio_event_type type, 183 183 enum iio_event_direction dir, 184 - int state) 184 + bool state) 185 185 { 186 186 struct iqs624_pos_private *iqs624_pos = iio_priv(indio_dev); 187 187 struct iqs62x_core *iqs62x = iqs624_pos->iqs62x;
+1 -1
drivers/iio/proximity/aw96103.c
··· 422 422 static int aw96103_write_event_config(struct iio_dev *indio_dev, 423 423 const struct iio_chan_spec *chan, 424 424 enum iio_event_type type, 425 - enum iio_event_direction dir, int state) 425 + enum iio_event_direction dir, bool state) 426 426 { 427 427 struct aw96103 *aw96103 = iio_priv(indio_dev); 428 428
+1 -1
drivers/iio/proximity/cros_ec_mkbp_proximity.c
··· 167 167 static int cros_ec_mkbp_proximity_write_event_config(struct iio_dev *indio_dev, 168 168 const struct iio_chan_spec *chan, 169 169 enum iio_event_type type, 170 - enum iio_event_direction dir, int state) 170 + enum iio_event_direction dir, bool state) 171 171 { 172 172 struct cros_ec_mkbp_proximity_data *data = iio_priv(indio_dev); 173 173
+1 -1
drivers/iio/proximity/hx9023s.c
··· 874 874 const struct iio_chan_spec *chan, 875 875 enum iio_event_type type, 876 876 enum iio_event_direction dir, 877 - int state) 877 + bool state) 878 878 { 879 879 struct hx9023s_data *data = iio_priv(indio_dev); 880 880
+2 -1
drivers/iio/proximity/irsd200.c
··· 648 648 static int irsd200_write_event_config(struct iio_dev *indio_dev, 649 649 const struct iio_chan_spec *chan, 650 650 enum iio_event_type type, 651 - enum iio_event_direction dir, int state) 651 + enum iio_event_direction dir, 652 + bool state) 652 653 { 653 654 struct irsd200_data *data = iio_priv(indio_dev); 654 655 unsigned int tmp;
+1 -1
drivers/iio/proximity/sx9500.c
··· 540 540 const struct iio_chan_spec *chan, 541 541 enum iio_event_type type, 542 542 enum iio_event_direction dir, 543 - int state) 543 + bool state) 544 544 { 545 545 struct sx9500_data *data = iio_priv(indio_dev); 546 546 int ret;
+1 -1
drivers/iio/proximity/sx_common.c
··· 268 268 int sx_common_write_event_config(struct iio_dev *indio_dev, 269 269 const struct iio_chan_spec *chan, 270 270 enum iio_event_type type, 271 - enum iio_event_direction dir, int state) 271 + enum iio_event_direction dir, bool state) 272 272 { 273 273 struct sx_common_data *data = iio_priv(indio_dev); 274 274 unsigned int eventirq = SX_COMMON_FAR_IRQ | SX_COMMON_CLOSE_IRQ;
+1 -1
drivers/iio/proximity/sx_common.h
··· 143 143 int sx_common_write_event_config(struct iio_dev *indio_dev, 144 144 const struct iio_chan_spec *chan, 145 145 enum iio_event_type type, 146 - enum iio_event_direction dir, int state); 146 + enum iio_event_direction dir, bool state); 147 147 148 148 int sx_common_probe(struct i2c_client *client, 149 149 const struct sx_common_chip_info *chip_info,
+1 -1
drivers/iio/proximity/vcnl3020.c
··· 449 449 const struct iio_chan_spec *chan, 450 450 enum iio_event_type type, 451 451 enum iio_event_direction dir, 452 - int state) 452 + bool state) 453 453 { 454 454 switch (chan->type) { 455 455 case IIO_PROXIMITY:
+1 -1
drivers/iio/temperature/mcp9600.c
··· 200 200 const struct iio_chan_spec *chan, 201 201 enum iio_event_type type, 202 202 enum iio_event_direction dir, 203 - int state) 203 + bool state) 204 204 { 205 205 struct mcp9600_data *data = iio_priv(indio_dev); 206 206 struct i2c_client *client = data->client;
+1 -1
drivers/iio/temperature/tmp007.c
··· 216 216 217 217 static int tmp007_write_event_config(struct iio_dev *indio_dev, 218 218 const struct iio_chan_spec *chan, enum iio_event_type type, 219 - enum iio_event_direction dir, int state) 219 + enum iio_event_direction dir, bool state) 220 220 { 221 221 struct tmp007_data *data = iio_priv(indio_dev); 222 222 unsigned int status_mask;
+1 -1
include/linux/iio/iio.h
··· 514 514 const struct iio_chan_spec *chan, 515 515 enum iio_event_type type, 516 516 enum iio_event_direction dir, 517 - int state); 517 + bool state); 518 518 519 519 int (*read_event_value)(struct iio_dev *indio_dev, 520 520 const struct iio_chan_spec *chan,