Re: [PATCH v6 1/2] Documentation: dma: Add documentation for ZTE DMA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 05, 2015 at 10:06:07PM +0800, Jun Nie wrote:
> This patch adds documentation for the ZTE ZX296702 SoC DMA device
> DTS binding.
> 
Am going to apply this series with following fix:

----------><8------------------

>From 2107d71dd49e13741890fcb43ed73c04371a52dd Mon Sep 17 00:00:00 2001
From: Vinod Koul <vinod.koul@xxxxxxxxx>
Date: Mon, 18 May 2015 15:33:13 +0530
Subject: [PATCH] dmaengine: zxdma: explicitly free irq on device removal

At device removal, tasklets are not disabled and irqs are still enabled, so
free the irq explicitly on device removal

Signed-off-by: Vinod Koul <vinod.koul@xxxxxxxxx>
---
 drivers/dma/zx296702_dma.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/zx296702_dma.c b/drivers/dma/zx296702_dma.c
index c99f0d1ac88a..ec470bc74df8 100644
--- a/drivers/dma/zx296702_dma.c
+++ b/drivers/dma/zx296702_dma.c
@@ -127,6 +127,7 @@ struct zx_dma_dev {
 	struct dma_pool		*pool;
 	u32			dma_channels;
 	u32			dma_requests;
+	int 			irq;
 };
 
 #define to_zx_dma(dmadev) container_of(dmadev, struct zx_dma_dev, slave)
@@ -683,7 +684,7 @@ static int zx_dma_probe(struct platform_device *op)
 {
 	struct zx_dma_dev *d;
 	struct resource *iores;
-	int i, ret = 0, irq = 0;
+	int i, ret = 0;
 
 	iores = platform_get_resource(op, IORESOURCE_MEM, 0);
 	if (!iores)
@@ -710,8 +711,8 @@ static int zx_dma_probe(struct platform_device *op)
 		return PTR_ERR(d->clk);
 	}
 
-	irq = platform_get_irq(op, 0);
-	ret = devm_request_irq(&op->dev, irq, zx_dma_int_handler,
+	d->irq = platform_get_irq(op, 0);
+	ret = devm_request_irq(&op->dev, d->irq, zx_dma_int_handler,
 			       0, DRIVER_NAME, d);
 	if (ret)
 		return ret;
@@ -807,6 +808,9 @@ static int zx_dma_remove(struct platform_device *op)
 	struct zx_dma_chan *c, *cn;
 	struct zx_dma_dev *d = platform_get_drvdata(op);
 
+	/* explictly free the irq */
+	devm_free_irq(&op->dev, d->irq, d);
+
 	dma_async_device_unregister(&d->slave);
 	of_dma_controller_free((&op->dev)->of_node);
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux