[v1,3/3] soc/tegra: fuse: Explicitly request DMA channel from APB DMA driver

Message ID b43be9bcd588d5e4496d3efd6571f9f6561a7844.1506378772.git.digetx@gmail.com
State Superseded
Headers show
Series
  • [v1,1/3] soc/tegra: fuse: Fix reading registers using DMA on Tegra20
Related show

Commit Message

Dmitry Osipenko Sept. 25, 2017, 10:35 p.m.
Currently efuse driver requests DMA channel from an arbitrary DMA device,
it is not a problem since there is only one DMA provider for Tegra20 yet,
but it will become troublesome once another provider would be added.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/soc/tegra/fuse/fuse-tegra20.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

Patch

diff --git a/drivers/soc/tegra/fuse/fuse-tegra20.c b/drivers/soc/tegra/fuse/fuse-tegra20.c
index a33f48c06771..06ec3f9573e6 100644
--- a/drivers/soc/tegra/fuse/fuse-tegra20.c
+++ b/drivers/soc/tegra/fuse/fuse-tegra20.c
@@ -98,14 +98,9 @@  static u32 tegra20_fuse_read(struct tegra_fuse *fuse, unsigned int offset)
 
 static int tegra20_fuse_probe(struct tegra_fuse *fuse)
 {
-	dma_cap_mask_t mask;
-
-	dma_cap_zero(mask);
-	dma_cap_set(DMA_SLAVE, mask);
-
-	fuse->apbdma.chan = dma_request_channel(mask, NULL, NULL);
-	if (!fuse->apbdma.chan)
-		return -EPROBE_DEFER;
+	fuse->apbdma.chan = dma_request_chan(fuse->dev, "fuse");
+	if (IS_ERR(fuse->apbdma.chan))
+		return PTR_ERR(fuse->apbdma.chan);
 
 	fuse->apbdma.virt = dma_alloc_coherent(fuse->dev, sizeof(u32),
 					       &fuse->apbdma.phys,