chrome-platform.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: cros_ec_activity: Fix function casting error
@ 2025-06-23 18:51 Gwendal Grignou
  2025-06-24  2:22 ` Tzung-Bi Shih
  0 siblings, 1 reply; 3+ messages in thread
From: Gwendal Grignou @ 2025-06-23 18:51 UTC (permalink / raw)
  To: jic23; +Cc: tzungbi, chrome-platform, linux-iio, Gwendal Grignou

.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 <gwendal@google.com>
---
 drivers/iio/common/cros_ec_sensors/cros_ec_activity.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_activity.c b/drivers/iio/common/cros_ec_sensors/cros_ec_activity.c
index 6e38d115b6fe8..1d97a68e6ce11 100644
--- a/drivers/iio/common/cros_ec_sensors/cros_ec_activity.c
+++ b/drivers/iio/common/cros_ec_sensors/cros_ec_activity.c
@@ -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);
 
-- 
2.50.0.rc2.761.g2dc52ea45b-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-24  3:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-23 18:51 [PATCH] iio: cros_ec_activity: Fix function casting error Gwendal Grignou
2025-06-24  2:22 ` Tzung-Bi Shih
2025-06-24  3:24   ` Gwendal Grignou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).