platform/chrome: cros_ec_proto: Fix check_features ret val
authorPrashant Malani <pmalani@chromium.org>
Thu, 16 Sep 2021 01:46:27 +0000 (18:46 -0700)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>
Thu, 23 Sep 2021 15:41:30 +0000 (17:41 +0200)
commitd50497c4a05e73e76874fd0d4942036375a7ec0f
treec1f05368ee9a868bec66cabbfb6a78bfe13b8a7b
parent5135b2139212f55c07c47e9af5e22f5874514011
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
drivers/platform/chrome/cros_ec_proto.c
include/linux/platform_data/cros_ec_proto.h