From 9d0bb00192d460ef0a445040bf245a4840d38fbb Mon Sep 17 00:00:00 2001 From: Shawn Nematbakhsh Date: Wed, 27 Aug 2014 17:46:13 -0700 Subject: [PATCH] host_command_pd: Fix condition for sending a PD MCU host event PD_STATUS_HOST_EVENT is a non-zero bitmask, so use '&' to check the proper bit(s) in the condition. BUG=chrome-os-partner:31361 TEST=Manual on Samus. Plug + unplug zinger, verify that host events are not set. Also, verify that 'pdevent' console command still sets the host event. BRANCH=None. Signed-off-by: Shawn Nematbakhsh Change-Id: I15c61c3c872ce8e7425678b2c669fcfa1eec89a6 Reviewed-on: https://chromium-review.googlesource.com/214631 Reviewed-by: Alec Berg --- common/host_command_pd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/host_command_pd.c b/common/host_command_pd.c index 467dc07dd7..ecd5e07cf5 100644 --- a/common/host_command_pd.c +++ b/common/host_command_pd.c @@ -56,7 +56,7 @@ static void pd_exchange_status(void) CPRINTS("Failed to set input current limit from PD MCU"); /* If PD is signalling host event, then pass it up to AP */ - if (pd_status.status | PD_STATUS_HOST_EVENT) + if (pd_status.status & PD_STATUS_HOST_EVENT) host_set_single_event(EC_HOST_EVENT_PD_MCU); }