Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: rcar-hpbdma: fixup WARNING of slave caps retrieval

ecc19d17868be9c9f8f00ed928791533c420f3e0
(dmaengine: Add a warning for drivers not using the generic slave
caps retrieval) added WARN() for DMA_SLAVE.
Kernel will shows WARNING without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>

authored by

Kuninori Morimoto and committed by
Vinod Koul
7a96337d 63c72e02

+6
+6
drivers/dma/sh/rcar-hpbdma.c
··· 534 534 535 535 static int hpb_dmae_probe(struct platform_device *pdev) 536 536 { 537 + const enum dma_slave_buswidth widths = DMA_SLAVE_BUSWIDTH_1_BYTE | 538 + DMA_SLAVE_BUSWIDTH_2_BYTES | DMA_SLAVE_BUSWIDTH_4_BYTES; 537 539 struct hpb_dmae_pdata *pdata = pdev->dev.platform_data; 538 540 struct hpb_dmae_device *hpbdev; 539 541 struct dma_device *dma_dev; ··· 597 595 598 596 dma_cap_set(DMA_MEMCPY, dma_dev->cap_mask); 599 597 dma_cap_set(DMA_SLAVE, dma_dev->cap_mask); 598 + dma_dev->src_addr_widths = widths; 599 + dma_dev->dst_addr_widths = widths; 600 + dma_dev->directions = BIT(DMA_MEM_TO_DEV) | BIT(DMA_DEV_TO_MEM); 601 + dma_dev->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; 600 602 601 603 hpbdev->shdma_dev.ops = &hpb_dmae_ops; 602 604 hpbdev->shdma_dev.desc_size = sizeof(struct hpb_desc);