[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1448612982-28141-2-git-send-email-peter.ujfalusi@ti.com>
Date: Fri, 27 Nov 2015 10:29:37 +0200
From: Peter Ujfalusi <peter.ujfalusi@...com>
To: <vinod.koul@...el.com>, <arnd@...db.de>,
<andy.shevchenko@...il.com>
CC: <linux-kernel@...r.kernel.org>, <dmaengine@...r.kernel.org>,
<linux-omap@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mmc@...r.kernel.org>, <nsekhar@...com>
Subject: [RFC 1/6] dmaengine: core: Allow NULL mask pointer in __dma_device_satisfies_mask()
Treat as true condition the case when the mask is NULL.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
---
drivers/dma/dmaengine.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index daf54a39bcc7..52c3eee48e2e 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -184,6 +184,9 @@ __dma_device_satisfies_mask(struct dma_device *device,
{
dma_cap_mask_t has;
+ if (!want)
+ return true;
+
bitmap_and(has.bits, want->bits, device->cap_mask.bits,
DMA_TX_TYPE_END);
return bitmap_equal(want->bits, has.bits, DMA_TX_TYPE_END);
--
2.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists