]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
platform/chrome: cros_ec_lightbar: Use cros_ec_cmd_xfer_status helper
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>
Thu, 20 Feb 2020 15:58:57 +0000 (16:58 +0100)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>
Mon, 2 Mar 2020 10:04:05 +0000 (11:04 +0100)
commitcff38b0c58fc738ad559582c13878aa882da6a56
treedaf319c1b55020cedd6c84e7a056679b32050f9b
parent72540a57165392b8d4eea6c076886d3128849604
platform/chrome: cros_ec_lightbar: Use cros_ec_cmd_xfer_status helper

This patch makes use of cros_ec_cmd_xfer_status() instead of
cros_ec_cmd_xfer(). It allows us to remove some redundand code. In this
case, though, we are changing a bit the behaviour because of returning
-EINVAL on protocol error we propagate the error return for
cros_ec_cmd_xfer_status() function, but I think it will be fine, even
more clear as we don't mask the Linux error code.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Tested-by: Prashant Malani <pmalani@chromium.org>
drivers/platform/chrome/cros_ec_lightbar.c