From patchwork Wed Jul 30 13:11:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vignesh Raman X-Patchwork-Id: 4649081 X-Patchwork-Delegate: vinod.koul@intel.com Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4260DC0338 for ; Wed, 30 Jul 2014 13:11:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3694A2015E for ; Wed, 30 Jul 2014 13:11:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F6B020158 for ; Wed, 30 Jul 2014 13:11:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753281AbaG3NLd (ORCPT ); Wed, 30 Jul 2014 09:11:33 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:37832 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753120AbaG3NLY (ORCPT ); Wed, 30 Jul 2014 09:11:24 -0400 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1XCTfA-0004jf-38 from Vignesh_Raman@mentor.com ; Wed, 30 Jul 2014 06:11:24 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 30 Jul 2014 06:11:23 -0700 Received: from m4700.inp-wifi.mentorg.com (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Wed, 30 Jul 2014 06:10:42 -0700 From: Vignesh Raman To: , , , CC: Subject: [PATCH 2/2] dma: imx-sdma: Adding tasklet_kill() in sdma_remove function. Date: Wed, 30 Jul 2014 18:41:15 +0530 Message-ID: <1406725875-9171-3-git-send-email-Vignesh_Raman@mentor.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1406725875-9171-1-git-send-email-Vignesh_Raman@mentor.com> References: <1406725875-9171-1-git-send-email-Vignesh_Raman@mentor.com> MIME-Version: 1.0 X-OriginalArrivalTime: 30 Jul 2014 13:11:23.0934 (UTC) FILETIME=[C35393E0:01CFABF7] Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Several dma drivers calls tasklet_kill() in remove function. This is missing in imx driver, so adding tasklet_kill() in sdma_remove function. Signed-off-by: Vignesh Raman --- drivers/dma/imx-sdma.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 1360b9d..974337f 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1636,12 +1636,19 @@ static int sdma_remove(struct platform_device *pdev) struct sdma_engine *sdma = platform_get_drvdata(pdev); struct resource *iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); int irq = platform_get_irq(pdev, 0); + int i; dma_async_device_unregister(&sdma->dma_device); kfree(sdma->script_addrs); free_irq(irq, sdma); iounmap(sdma->regs); release_mem_region(iores->start, resource_size(iores)); + /* Kill the tasklet */ + for (i = 0; i < MAX_DMA_CHANNELS; i++) { + struct sdma_channel *sdmac = &sdma->channel[i]; + + tasklet_kill(&sdmac->tasklet); + } kfree(sdma); platform_set_drvdata(pdev, NULL);