From 4051943e95518287dfded78c2314a51cc963477d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Sat, 3 Oct 2015 15:06:46 +0200 Subject: [PATCH] Do not reschedule if the queue is empty --- plugin/klgd_ff_plugin.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/klgd_ff_plugin.c b/plugin/klgd_ff_plugin.c index aac368f..6d87677 100644 --- a/plugin/klgd_ff_plugin.c +++ b/plugin/klgd_ff_plugin.c @@ -848,6 +848,11 @@ static void ffpl_request_work(struct work_struct *w) klgd_lock_plugins(self->plugins_lock); spin_lock_irqsave(&priv->dev->event_lock, flags); + if (list_empty(&priv->rq_list)) { + spin_unlock_irqrestore(&priv->dev->event_lock, flags); + klgd_unlock_plugins(self->plugins_lock); + } + list_for_each_safe(p, n, &priv->rq_list) { struct ffpl_request_task *t = list_entry(p, struct ffpl_request_task, rq_list); struct ffpl_request *rq = &t->rq; -- 2.43.5