mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 22:05:08 +00:00
platform/chrome: cros_ec_typec: Flush pending work
When a PD notifier event arrives, a new work event won't be enqueued if the current one hasn't completed. This could lead to dropped events. So, flush any pending work before scheduling the new instance. Signed-off-by: Prashant Malani <pmalani@chromium.org> Link: https://lore.kernel.org/r/20210211193221.610867-1-pmalani@chromium.org Signed-off-by: Benson Leung <bleung@chromium.org>
This commit is contained in:
parent
b4b06c9772
commit
a59e12218c
@ -1031,6 +1031,7 @@ static int cros_ec_typec_event(struct notifier_block *nb,
|
||||
{
|
||||
struct cros_typec_data *typec = container_of(nb, struct cros_typec_data, nb);
|
||||
|
||||
flush_work(&typec->port_work);
|
||||
schedule_work(&typec->port_work);
|
||||
|
||||
return NOTIFY_OK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user