]> Pileus Git - ~andy/linux/blobdiff - drivers/dma/shdma.c
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
[~andy/linux] / drivers / dma / shdma.c
index a1727522343e914ee63a5bf064ede9544374abdc..a2a519fd2a24fc3ec9f4d1daa63fba110d99684e 100644 (file)
@@ -722,6 +722,10 @@ static void sh_dmae_chan_ld_cleanup(struct sh_dmae_chan *sh_chan, bool all)
 {
        while (__ld_cleanup(sh_chan, all))
                ;
+
+       if (all)
+               /* Terminating - forgive uncompleted cookies */
+               sh_chan->completed_cookie = sh_chan->common.cookie;
 }
 
 static void sh_chan_xfer_ld_queue(struct sh_dmae_chan *sh_chan)
@@ -1188,6 +1192,7 @@ static struct platform_driver sh_dmae_driver = {
        .remove         = __exit_p(sh_dmae_remove),
        .shutdown       = sh_dmae_shutdown,
        .driver = {
+               .owner  = THIS_MODULE,
                .name   = "sh-dma-engine",
        },
 };