[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200130203106.201894-18-pmalani@chromium.org>
Date: Thu, 30 Jan 2020 12:31:10 -0800
From: Prashant Malani <pmalani@...omium.org>
To: linux-kernel@...r.kernel.org
Cc: Prashant Malani <pmalani@...omium.org>,
Benson Leung <bleung@...omium.org>,
Enric Balletbo i Serra <enric.balletbo@...labora.com>,
Guenter Roeck <groeck@...omium.org>,
Lee Jones <lee.jones@...aro.org>,
Gwendal Grignou <gwendal@...omium.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Evan Green <evgreen@...omium.org>
Subject: [PATCH 17/17] platform/chrome: Drop cros_ec_cmd_xfer_status()
Remove cros_ec_cmd_xfer_status() since all usages of that function
have been converted to cros_ec_send_cmd_msg().
Signed-off-by: Prashant Malani <pmalani@...omium.org>
---
drivers/platform/chrome/cros_ec_proto.c | 42 +++++----------------
include/linux/platform_data/cros_ec_proto.h | 3 --
2 files changed, 9 insertions(+), 36 deletions(-)
diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c
index efd1c0b6a830c8..8b97702ba97393 100644
--- a/drivers/platform/chrome/cros_ec_proto.c
+++ b/drivers/platform/chrome/cros_ec_proto.c
@@ -542,35 +542,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_send_cmd_msg() - Utility function to send commands to ChromeOS EC.
* @ec: EC device struct.
@@ -581,10 +552,15 @@ EXPORT_SYMBOL(cros_ec_cmd_xfer_status);
* @indata: Data to be received from the EC.
* @insize: Size of the &indata buffer.
*
- * This function is a wrapper around &cros_ec_cmd_xfer_status, and performs
- * some of the common work involved with sending a command to the EC. This
- * includes allocating and filling up a &struct cros_ec_command message buffer,
- * and copying the received data to another buffer.
+ * This function is similar 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.
+ *
+ * It also performs some of the common work involved with sending a command to
+ * the EC. This includes allocating and filling up a
+ * &struct cros_ec_command message buffer, and copying the received data to
+ * another buffer.
*
* Return: The number of bytes transferred on success or negative error code.
*/
diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/platform_data/cros_ec_proto.h
index 166ce26bdd79eb..851bd9af582d94 100644
--- a/include/linux/platform_data/cros_ec_proto.h
+++ b/include/linux/platform_data/cros_ec_proto.h
@@ -198,9 +198,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_send_cmd_msg(struct cros_ec_device *ec_dev, unsigned int version,
unsigned int command, void *outdata,
unsigned int outsize, void *indata,
--
2.25.0.341.g760bfbb309-goog
Powered by blists - more mailing lists