summaryrefslogtreecommitdiffstats
path: root/drivers/platform/chrome/cros_ec_proto.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-13 05:04:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-13 05:04:46 +0000
commitab7a1d20a3def1448bdcc128d77ebf50a672e4a5 (patch)
tree09a6c24baf5e8a0cafc6ebb9fb94b7062e31f7ec /drivers/platform/chrome/cros_ec_proto.c
parentAdding debian version 6.10.3-1. (diff)
downloadlinux-ab7a1d20a3def1448bdcc128d77ebf50a672e4a5.tar.xz
linux-ab7a1d20a3def1448bdcc128d77ebf50a672e4a5.zip
Merging upstream version 6.10.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/platform/chrome/cros_ec_proto.c')
-rw-r--r--drivers/platform/chrome/cros_ec_proto.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c
index 945b1b15a0..f8242b8dda 100644
--- a/drivers/platform/chrome/cros_ec_proto.c
+++ b/drivers/platform/chrome/cros_ec_proto.c
@@ -805,9 +805,11 @@ int cros_ec_get_next_event(struct cros_ec_device *ec_dev,
if (ret == -ENOPROTOOPT) {
dev_dbg(ec_dev->dev,
"GET_NEXT_EVENT returned invalid version error.\n");
+ mutex_lock(&ec_dev->lock);
ret = cros_ec_get_host_command_version_mask(ec_dev,
EC_CMD_GET_NEXT_EVENT,
&ver_mask);
+ mutex_unlock(&ec_dev->lock);
if (ret < 0 || ver_mask == 0)
/*
* Do not change the MKBP supported version if we can't