Skip to content

Commit 67ea023

Browse files
Prashant MalaniEnric Balletbo i Serra
authored andcommitted
platform/chrome: cros_usbpd_notify: Rename cros_ec_pd_command()
Rename cros_ec_pd_command()_to cros_ec_command() since it can be used for sending any host command, and not just PD related ones. This patch does not introduce any functional changes. Signed-off-by: Prashant Malani <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent eb05751 commit 67ea023

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

drivers/platform/chrome/cros_usbpd_notify.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void cros_usbpd_unregister_notify(struct notifier_block *nb)
5454
EXPORT_SYMBOL_GPL(cros_usbpd_unregister_notify);
5555

5656
/**
57-
* cros_ec_pd_command - Send a command to the EC.
57+
* cros_ec_command - Send a command to the EC.
5858
*
5959
* @ec_dev: EC device
6060
* @command: EC command
@@ -65,12 +65,12 @@ EXPORT_SYMBOL_GPL(cros_usbpd_unregister_notify);
6565
*
6666
* Return: >= 0 on success, negative error number on failure.
6767
*/
68-
static int cros_ec_pd_command(struct cros_ec_device *ec_dev,
69-
int command,
70-
uint8_t *outdata,
71-
int outsize,
72-
uint8_t *indata,
73-
int insize)
68+
static int cros_ec_command(struct cros_ec_device *ec_dev,
69+
int command,
70+
uint8_t *outdata,
71+
int outsize,
72+
uint8_t *indata,
73+
int insize)
7474
{
7575
struct cros_ec_command *msg;
7676
int ret;
@@ -115,10 +115,8 @@ static void cros_usbpd_get_event_and_notify(struct device *dev,
115115
}
116116

117117
/* Check for PD host events on EC. */
118-
ret = cros_ec_pd_command(ec_dev, EC_CMD_PD_HOST_EVENT_STATUS,
119-
NULL, 0,
120-
(uint8_t *)&host_event_status,
121-
sizeof(host_event_status));
118+
ret = cros_ec_command(ec_dev, EC_CMD_PD_HOST_EVENT_STATUS,
119+
NULL, 0, (uint8_t *)&host_event_status, sizeof(host_event_status));
122120
if (ret < 0) {
123121
dev_warn(dev, "Can't get host event status (err: %d)\n", ret);
124122
goto send_notify;

0 commit comments

Comments
 (0)