platform/chrome: cros_ec_proto: use cros_ec_map_error()
authorTzung-Bi Shih <tzungbi@kernel.org>
Thu, 9 Jun 2022 08:49:42 +0000 (08:49 +0000)
committerTzung-Bi Shih <tzungbi@kernel.org>
Fri, 10 Jun 2022 02:31:43 +0000 (02:31 +0000)
commit93bea2faed630bd014916fd2e7ab16a79ee1b46a
treed29090ba49bc20fe969458ca882eb18e4f7e45d7
parent8e3991610ba5c11003d8c228b280cc007c2a6177
platform/chrome: cros_ec_proto: use cros_ec_map_error()

Use cros_ec_map_error() in cros_ec_get_host_event_wake_mask().

The behavior of cros_ec_get_host_event_wake_mask() slightly changed.  It
is acceptable because the caller only needs it returns negative integers
for indicating errors.  Especially, the EC_RES_INVALID_COMMAND still
maps to -EOPNOTSUPP.

Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20220609084957.3684698-7-tzungbi@kernel.org
drivers/platform/chrome/cros_ec_proto.c