UPSTREAM: dmaengine: core: Skip mask matching when it is not provided to private_cand...
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 14 Dec 2015 20:47:38 +0000 (22:47 +0200)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 5 Jul 2016 06:29:36 +0000 (14:29 +0800)
If mask is NULL skip the mask matching against the DMA device capabilities.

Change-Id: Iee44026c8d43493e4e73d8d483545267dc2e08a7
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
 commit 26b64256e0c4573f3668ac8329a1266ebb9d6120)

drivers/dma/dmaengine.c

index 6dbe777b04f5ce78746a259e7eb97e9bb4576440..002ed81c277b6e7db3c7c95f16248a9854a76c27 100644 (file)
@@ -515,7 +515,7 @@ static struct dma_chan *private_candidate(const dma_cap_mask_t *mask,
 {
        struct dma_chan *chan;
 
-       if (!__dma_device_satisfies_mask(dev, mask)) {
+       if (mask && !__dma_device_satisfies_mask(dev, mask)) {
                pr_debug("%s: wrong capabilities\n", __func__);
                return NULL;
        }