summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPrashant Malani <pmalani@chromium.org>2021-09-15 18:46:27 -0700
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>2021-09-23 17:41:30 +0200
commitd50497c4a05e73e76874fd0d4942036375a7ec0f (patch)
treec1f05368ee9a868bec66cabbfb6a78bfe13b8a7b /include/linux
parent5135b2139212f55c07c47e9af5e22f5874514011 (diff)
downloadlinux-stable-d50497c4a05e73e76874fd0d4942036375a7ec0f.tar.gz
linux-stable-d50497c4a05e73e76874fd0d4942036375a7ec0f.tar.bz2
linux-stable-d50497c4a05e73e76874fd0d4942036375a7ec0f.zip
platform/chrome: cros_ec_proto: Fix check_features ret val
The kerneldoc for cros_ec_check_features() states that it returns 1 or 0 depedending on whether a feature is supported or not, but it instead returns a negative error number in one case, and a non-1 bitmask in other cases. Since all call-sites only check for a 1 or 0 return value, update the function to return boolean values. Signed-off-by: Prashant Malani <pmalani@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20210916014632.2662612-1-pmalani@chromium.org
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/platform_data/cros_ec_proto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/platform_data/cros_ec_proto.h
index 02599687770c..55844ece0b32 100644
--- a/include/linux/platform_data/cros_ec_proto.h
+++ b/include/linux/platform_data/cros_ec_proto.h
@@ -227,7 +227,7 @@ int cros_ec_get_next_event(struct cros_ec_device *ec_dev,
u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev);
-int cros_ec_check_features(struct cros_ec_dev *ec, int feature);
+bool cros_ec_check_features(struct cros_ec_dev *ec, int feature);
int cros_ec_get_sensor_count(struct cros_ec_dev *ec);