From cc7889bfaec9243ff35b6a366f6f2c7c65c33a13 Mon Sep 17 00:00:00 2001 From: Emil Lundmark Date: Tue, 22 May 2018 17:51:25 +0200 Subject: usb_port_power: Use same name for mode set function Dumb USB ports do not have the same notion of charge mode as smart ports. However, the header common/usb_charge.h declares a function for changing charge mode that the dumb USB port power implementation does not define. Instead, it defines a similar function with a different name, albeit with other allowed values for its second parameter. This patch makes the names the same so the function can be used by simply including the aforementioned header file. BUG=none BRANCH=fizz TEST=emerge-fizz chromeos-ec Change-Id: I87863f87f32f538cc1c723d9299afcc7353e1852 Signed-off-by: Emil Lundmark Reviewed-on: https://chromium-review.googlesource.com/1069272 Reviewed-by: Randall Spangler Reviewed-by: Vincent Palatin --- common/usb_port_power_dumb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/usb_port_power_dumb.c b/common/usb_port_power_dumb.c index b909fd1c41..a37fb84c3f 100644 --- a/common/usb_port_power_dumb.c +++ b/common/usb_port_power_dumb.c @@ -47,7 +47,7 @@ static void usb_port_all_ports_off(void) /*****************************************************************************/ /* Host commands */ -int usb_port_set_mode(int port_id, enum usb_charge_mode mode) +int usb_charge_set_mode(int port_id, enum usb_charge_mode mode) { CPRINTS("USB port p%d %d", port_id, mode); @@ -72,7 +72,7 @@ static int usb_port_command_set_mode(struct host_cmd_handler_args *args) { const struct ec_params_usb_charge_set_mode *p = args->params; - if (usb_port_set_mode(p->usb_port_id, p->mode) != EC_SUCCESS) + if (usb_charge_set_mode(p->usb_port_id, p->mode) != EC_SUCCESS) return EC_RES_ERROR; return EC_RES_SUCCESS; -- cgit v1.2.1