Skip to contentSkip to conversation

media: m2m-deinterlace: use dmaengine_has_cap() instead of dma_has_cap()

PATCH New [email protected] 1 participant 1 message Nov 11

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: m2m-deinterlace: use dmaengine_has_cap() instead of dma_has_cap()

From: Frank Li <[email protected]>

Replace the open-coded dma_has_cap(DMA_INTERLEAVE, pcdev->dma_chan->device->cap_mask) with the dmaengine_has_cap() helper, which encapsulates the capability check and takes the dma_chan pointer directly.

No functional change and prepare to move struct dma_device to private.

---
 drivers/media/platform/m2m-deinterlace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/m2m-deinterlace.c +1 -1
index df291b5f7501f..33f05d2baed6a 100644
@@ -924,7 +924,7 @@ static int deinterlace_probe(struct platform_device *pdev)
 	if (!pcdev->dma_chan)
 		return -ENODEV;
 
-	if (!dma_has_cap(DMA_INTERLEAVE, pcdev->dma_chan->device->cap_mask)) {
+	if (!dmaengine_has_cap(pcdev->dma_chan, DMA_INTERLEAVE)) {
 		dev_err(&pdev->dev, "DMA does not support INTERLEAVE\n");
 		ret = -ENODEV;
 		goto rel_dma;
Signature · 1 line
2.43.0