From patchwork Mon May 18 10:07:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 6427571 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 267A99F1C1 for ; Mon, 18 May 2015 10:06:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 45AC0205DF for ; Mon, 18 May 2015 10:06:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 43BFB205DC for ; Mon, 18 May 2015 10:06:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753021AbbERKGv (ORCPT ); Mon, 18 May 2015 06:06:51 -0400 Received: from mga14.intel.com ([192.55.52.115]:2457 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752746AbbERKGv (ORCPT ); Mon, 18 May 2015 06:06:51 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 18 May 2015 03:06:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,452,1427785200"; d="scan'208";a="727672619" Received: from vkoul-udesk7.iind.intel.com (HELO localhost.localdomain) ([10.223.84.34]) by fmsmga002.fm.intel.com with ESMTP; 18 May 2015 03:06:48 -0700 Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost.localdomain (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t4IA7qOu011998; Mon, 18 May 2015 15:37:52 +0530 Received: (from vkoul@localhost) by localhost.localdomain (8.14.4/8.14.4/Submit) id t4IA7pFZ011997; Mon, 18 May 2015 15:37:51 +0530 X-Authentication-Warning: localhost.localdomain: vkoul set sender to vinod.koul@intel.com using -f Date: Mon, 18 May 2015 15:37:51 +0530 From: Vinod Koul To: Jun Nie Cc: maxime.ripard@free-electrons.com, dmaengine@vger.kernel.org, shawn.guo@linaro.org, wan.zhijun@zte.com.cn, zte-lt@lists.linaro.org Subject: Re: [PATCH v6 1/2] Documentation: dma: Add documentation for ZTE DMA Message-ID: <20150518100751.GD3140@localhost> References: <1430834768-27745-1-git-send-email-jun.nie@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1430834768-27745-1-git-send-email-jun.nie@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 --- 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);