[PATCH v2 17/17] platform/chrome: Drop cros_ec_cmd_xfer_status()

From: Prashant Malani
Date: Wed Feb 05 2020 - 14:25:11 EST


Remove cros_ec_cmd_xfer_status() since all usages of that function
have been converted to cros_ec_cmd().

Signed-off-by: Prashant Malani <pmalani@xxxxxxxxxxxx>
---

Changes in v2:
- Updated, since removing function is more straightforward and doesn't
need any modification of the newly introduced function's
documentation.

drivers/platform/chrome/cros_ec_proto.c | 29 ---------------------
include/linux/platform_data/cros_ec_proto.h | 3 ---
2 files changed, 32 deletions(-)

diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c
index aa7ae1f394cc91..24ef9ae278c488 100644
--- a/drivers/platform/chrome/cros_ec_proto.c
+++ b/drivers/platform/chrome/cros_ec_proto.c
@@ -543,35 +543,6 @@ int cros_ec_cmd_xfer(struct cros_ec_device *ec_dev,
}
EXPORT_SYMBOL(cros_ec_cmd_xfer);

-/**
- * cros_ec_cmd_xfer_status() - Send a command to the ChromeOS EC.
- * @ec_dev: EC device.
- * @msg: Message to write.
- *
- * This function is identical to cros_ec_cmd_xfer, except it returns success
- * status only if both the command was transmitted successfully and the EC
- * replied with success status. It's not necessary to check msg->result when
- * using this function.
- *
- * Return: The number of bytes transferred on success or negative error code.
- */
-int cros_ec_cmd_xfer_status(struct cros_ec_device *ec_dev,
- struct cros_ec_command *msg)
-{
- int ret;
-
- ret = cros_ec_cmd_xfer(ec_dev, msg);
- if (ret < 0) {
- dev_err(ec_dev->dev, "Command xfer error (err:%d)\n", ret);
- } else if (msg->result != EC_RES_SUCCESS) {
- dev_dbg(ec_dev->dev, "Command result (err: %d)\n", msg->result);
- return -EPROTO;
- }
-
- return ret;
-}
-EXPORT_SYMBOL(cros_ec_cmd_xfer_status);
-
/**
* cros_ec_cmd() - Utility function to send commands to ChromeOS EC.
* @ec: EC device struct.
diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/platform_data/cros_ec_proto.h
index 54b9bbf9a07c0c..6bd78467c2326d 100644
--- a/include/linux/platform_data/cros_ec_proto.h
+++ b/include/linux/platform_data/cros_ec_proto.h
@@ -215,9 +215,6 @@ int cros_ec_check_result(struct cros_ec_device *ec_dev,
int cros_ec_cmd_xfer(struct cros_ec_device *ec_dev,
struct cros_ec_command *msg);

-int cros_ec_cmd_xfer_status(struct cros_ec_device *ec_dev,
- struct cros_ec_command *msg);
-
int cros_ec_cmd(struct cros_ec_device *ec_dev, u32 version, u32 command,
void *outdata, u32 outsize, void *indata, u32 insize,
u32 *result);
--
2.25.0.341.g760bfbb309-goog