From: Gwendal Grignou <gwendal@chromium.org>
To: jic23@kernel.org
Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev,
linux-iio@vger.kernel.org, Gwendal Grignou <gwendal@google.com>
Subject: [PATCH] iio: cros_ec_activity: Fix function casting error
Date: Mon, 23 Jun 2025 11:51:52 -0700 [thread overview]
Message-ID: <20250623185153.222714-1-gwendal@google.com> (raw)
.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
next reply other threads:[~2025-06-23 18:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 18:51 Gwendal Grignou [this message]
2025-06-24 2:22 ` [PATCH] iio: cros_ec_activity: Fix function casting error Tzung-Bi Shih
2025-06-24 3:24 ` Gwendal Grignou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250623185153.222714-1-gwendal@google.com \
--to=gwendal@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=gwendal@google.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=tzungbi@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.