]> Devoid-pointer.net GitWeb - KLGD_FF_plugin.git/commitdiff
Do not reschedule if the queue is empty
authorMichal Malý <madcatxster@devoid-pointer.net>
Sat, 3 Oct 2015 13:06:46 +0000 (15:06 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Sat, 3 Oct 2015 13:06:46 +0000 (15:06 +0200)
plugin/klgd_ff_plugin.c

index aac368ffc8566bd10beb15ddecb473c840ddb496..6d87677538757d692ba1707c97593d19c26c137c 100644 (file)
@@ -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;