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
This commit is contained in:
committed by
Enric Balletbo i Serra
parent
5135b21392
commit
d50497c4a0
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user