]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/dma/at_hdmac.c
Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
[mirror_ubuntu-zesty-kernel.git] / drivers / dma / at_hdmac.c
index 3502c412caf90dc654ed86ca79819739a1a54b87..e923cda930f98a09c90fa73b868cfeb3b619b30d 100644 (file)
@@ -311,8 +311,6 @@ static void atc_complete_all(struct at_dma_chan *atchan)
 
        dev_vdbg(chan2dev(&atchan->chan_common), "complete all\n");
 
-       BUG_ON(atc_chan_is_enabled(atchan));
-
        /*
         * Submit queued descriptors ASAP, i.e. before we go through
         * the completed ones.
@@ -369,6 +367,9 @@ static void atc_advance_work(struct at_dma_chan *atchan)
 {
        dev_vdbg(chan2dev(&atchan->chan_common), "advance_work\n");
 
+       if (atc_chan_is_enabled(atchan))
+               return;
+
        if (list_empty(&atchan->active_list) ||
            list_is_singular(&atchan->active_list)) {
                atc_complete_all(atchan);
@@ -1079,9 +1080,7 @@ static void atc_issue_pending(struct dma_chan *chan)
                return;
 
        spin_lock_irqsave(&atchan->lock, flags);
-       if (!atc_chan_is_enabled(atchan)) {
-               atc_advance_work(atchan);
-       }
+       atc_advance_work(atchan);
        spin_unlock_irqrestore(&atchan->lock, flags);
 }