]> git.baikalelectronics.ru Git - kernel.git/commit
platform/chrome: cros_ec_sysfs: Modify error handling
authorGwendal Grignou <gwendal@chromium.org>
Fri, 23 Mar 2018 17:42:42 +0000 (18:42 +0100)
committerBenson Leung <bleung@chromium.org>
Wed, 11 Apr 2018 05:22:34 +0000 (22:22 -0700)
commitfc1ad07113fa328c442555b4189fbfcd86ab86e9
tree5866aa9ab73fe9ed3ebb7717bf7bcefda1032de5
parent102167605056ada9d6f77cb9d0ba7c87e3da60ab
platform/chrome: cros_ec_sysfs: Modify error handling

When accessing a sysfs attribute, if the EC command fails, -EPROTO is
now returned instead of an error message as it is unlikely an app is
parsing the error message to do something meaningful.
Also, this patch makes use of cros_ec_cmd_xfer_status() instead of
cros_ec_cmd_xfer() so an error message is printed in the syslog.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
drivers/platform/chrome/cros_ec_sysfs.c