summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/usb_pd_protocol.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index a9f3eaa62a..7b72a44229 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -297,9 +297,7 @@ static int pd_transmit(int port, enum tcpm_transmit_type type,
tcpm_transmit(port, type, header, data);
/* Wait until TX is complete */
- do {
- evt = task_wait_event(PD_T_TCPC_TX_TIMEOUT);
- } while (!(evt & (TASK_EVENT_TIMER | PD_EVENT_TX)));
+ evt = task_wait_event_mask(PD_EVENT_TX, PD_T_TCPC_TX_TIMEOUT);
if (evt & TASK_EVENT_TIMER)
return -1;