summaryrefslogtreecommitdiff
path: root/common/usbc/usb_tc_drp_acc_trysrc_sm.c
diff options
context:
space:
mode:
authorDawid Niedzwiecki <dn@semihalf.com>2020-11-06 09:20:56 +0100
committerCommit Bot <commit-bot@chromium.org>2020-12-14 19:59:09 +0000
commitf96f176c303a73973d7cf5ddf1abf86f534a6e39 (patch)
treea793c58f008cfa94cc93ea34627fd1b6457e3a1b /common/usbc/usb_tc_drp_acc_trysrc_sm.c
parenta23ef3d074335f2b6953194671f966117fd1fe60 (diff)
downloadchrome-ec-f96f176c303a73973d7cf5ddf1abf86f534a6e39.tar.gz
task_set_event: remove the wait argument
There is an option in the task_set_event function which force the calling task to wait for an event. However, the option is never used thus remove it. This also will help in the Zephyr migration process. BUG=b:172360521 BRANCH=none TEST=make buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ic152fd3d6862d487bcc0024c48d136556c0b81bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521599 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'common/usbc/usb_tc_drp_acc_trysrc_sm.c')
-rw-r--r--common/usbc/usb_tc_drp_acc_trysrc_sm.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
index c663f1ec77..fa146b3bfa 100644
--- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c
+++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
@@ -685,7 +685,7 @@ static inline void pd_set_dual_role_and_event(int port,
pd_update_try_source();
if (event != 0)
- task_set_event(PD_PORT_TO_TASK_ID(port), event, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), event);
}
void pd_set_dual_role(int port, enum pd_dual_role_states state)
@@ -1160,7 +1160,7 @@ static void bc12_role_change_handler(int port, enum pd_data_role prev_data_role,
}
if (event)
- task_set_event(task_id, event, 0);
+ task_set_event(task_id, event);
}
/*
@@ -1818,7 +1818,7 @@ static __maybe_unused int reset_device_and_notify(int port)
while (waiting_tasks) {
task = __fls(waiting_tasks);
waiting_tasks &= ~BIT(task);
- task_set_event(task, TASK_EVENT_PD_AWAKE, 0);
+ task_set_event(task, TASK_EVENT_PD_AWAKE);
}
return rv;
@@ -1845,8 +1845,7 @@ void pd_wait_exit_low_power(int port)
* happen much, but it if starts occurring, we can add a guard
* to prevent/reduce it.
*/
- task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_TCPC_RESET, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TCPC_RESET);
task_wait_event_mask(TASK_EVENT_PD_AWAKE, -1);
}
}
@@ -1861,7 +1860,7 @@ void pd_device_accessed(int port)
handle_device_access(port);
else
task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_DEVICE_ACCESSED, 0);
+ PD_EVENT_DEVICE_ACCESSED);
}
/*