From: Michal MalĂ˝ Date: Sat, 3 Oct 2015 13:06:46 +0000 (+0200) Subject: Do not reschedule if the queue is empty X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=4051943e95518287dfded78c2314a51cc963477d;p=KLGD_FF_plugin.git Do not reschedule if the queue is empty --- 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;