summaryrefslogtreecommitdiff
path: root/common/usb_pd_protocol.c
diff options
context:
space:
mode:
authorPaul Fagerburg <pfagerburg@google.com>2020-07-27 15:52:15 -0600
committerCommit Bot <commit-bot@chromium.org>2020-07-28 22:59:41 +0000
commit6efabc79d3519baa56ba1c065035a491fc6918ec (patch)
tree9981d7bbdc897ef485226c8f13000c4a2ef83403 /common/usb_pd_protocol.c
parent63498074bd3a77b28d2a96ef43aeceed51aa2bde (diff)
downloadchrome-ec-6efabc79d3519baa56ba1c065035a491fc6918ec.tar.gz
ec: change usage of whitelist/blacklist
Google is working to change its source code to use more inclusive language. To that end, replace the terms "whitelist", "blacklist", and similar with inclusive alternatives. BUG=b:162262297 BRANCH=None TEST=`grep -Eirl "(white|black)[ _\-]*list" .` The only results are in "private/nordic_keyboard/sdk8.0.0" which is not our code. Signed-off-by: Paul Fagerburg <pfagerburg@google.com> Change-Id: Ie5210b98e1096c22d0e9284c101a42820bd3d79d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2321549 Tested-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
Diffstat (limited to 'common/usb_pd_protocol.c')
-rw-r--r--common/usb_pd_protocol.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index 1d465385ea..b3be338d64 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -1478,12 +1478,12 @@ static void pd_update_pdo_flags(int port, uint32_t pdo)
{
#ifdef CONFIG_CHARGE_MANAGER
#ifdef CONFIG_USB_PD_ALT_MODE_DFP
- int charge_whitelisted =
+ int charge_allowlisted =
(pd[port].power_role == PD_ROLE_SINK &&
pd_charge_from_device(pd_get_identity_vid(port),
pd_get_identity_pid(port)));
#else
- const int charge_whitelisted = 0;
+ const int charge_allowlisted = 0;
#endif
#endif
@@ -1518,11 +1518,11 @@ static void pd_update_pdo_flags(int port, uint32_t pdo)
* Treat device as a dedicated charger (meaning we should charge
* from it) if it does not support power swap, or has unconstrained
* power, or if we are a sink and the device identity matches a
- * charging white-list.
+ * charging allow-list.
*/
if (!(pd[port].flags & PD_FLAGS_PARTNER_DR_POWER) ||
(pd[port].flags & PD_FLAGS_PARTNER_UNCONSTR) ||
- charge_whitelisted)
+ charge_allowlisted)
charge_manager_update_dualrole(port, CAP_DEDICATED);
else
charge_manager_update_dualrole(port, CAP_DUALROLE);