iio: cros_ec_activity: Fix function casting error
Subsystems (2)
PATCH 1/1 iio: cros_ec_activity: Fix function casting error
.write_event_configwrite_event_config expects |state| to be an int not a bool:
``` drivers/iio/common/cros_ec_sensors/cros_ec_activity.c:203:24: error: incompatible function pointer types initializing 'int (*)(struct iio_dev *, const struct iio_chan_spec *, enum iio_event_type, enum iio_event_direction, int)' with an expression of type 'int (struct iio_dev *, const struct iio_chan_spec *, enum iio_event_type, enum iio_event_direction, bool)' ... [-Wincompatible-function-pointer-types] ```
Fixes 9ad446870236 ("iio: cros_ec_sensors: add cros_ec_activity driver")
Signed-off-by Gwendal Grignou <[email protected]>
--- drivers/iio/common/cros_ec_sensors/cros_ec_activity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/common/cros_ec_sensors/cros_ec_activity.c +1 -1
@@ -122,7 +122,7 @@ static int cros_ec_activity_write_event_config(struct iio_dev *indio_dev,const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - bool state) + int state) { struct cros_ec_sensors_state *st = iio_priv(indio_dev);
Signature · 1 line
2.50.0.rc2.761.g2dc52ea45b-goog
Quoted 2 lines · Gwendal Grignou
.write_event_configwrite_event_config expects |state| to be an int not a bool:
No, state is a bool since commit b4b42f28a0df
("iio: fix write_event_config signature").
Quoted 7 lines · Tzung-Bi Shih
Quoted 2 lines · Gwendal Grignou
.write_event_configwrite_event_config expects |state| to be an int not a bool:
No,
stateis a bool since commitb4b42f28a0df
("iio: fixwrite_event_configsignature").
Correct, I just realized my mistake. Please ignore this patch as well...
Gwendal.