From d3a1820df21b12842232ab88a5c1a0490640bb25 Mon Sep 17 00:00:00 2001 From: Denis Brockus Date: Wed, 8 Jan 2020 06:54:30 -0700 Subject: pd: cleanup pd_get_role pd_get_role in the TCPMv1 stack meant pd_get_power_role. pd_get_role in the TCPMv2 stack meant pd_get_data_role. This CL will clean that up and make them the correct naming. pd_get_power_role will also return an enum pd_power_role type instead of an int. BUG=b:147290482 BRANCH=none TEST=make buildall -j Change-Id: I73ee465401ccd050c2bd151f2fc043a59d95e079 Signed-off-by: Denis Brockus Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1991844 Reviewed-by: Jett Rink --- common/charge_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/charge_manager.c') diff --git a/common/charge_manager.c b/common/charge_manager.c index 7f50e50b68..f9c6d8060c 100644 --- a/common/charge_manager.c +++ b/common/charge_manager.c @@ -149,7 +149,7 @@ static int is_sink(int port) if (!is_pd_port(port)) return board_charge_port_is_sink(port); - return pd_get_role(port) == PD_ROLE_SINK; + return pd_get_power_role(port) == PD_ROLE_SINK; } /** -- cgit v1.2.1