Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5717737ybl; Tue, 14 Jan 2020 13:50:05 -0800 (PST) X-Google-Smtp-Source: APXvYqzkTbW9dXkzDEl1ZFV0tTPp2j6klH64aagBCu4vrpZcYhUKuM8O1AWwjoA3SizwbLGc8W9M X-Received: by 2002:a05:6808:a8e:: with SMTP id q14mr17489720oij.173.1579038605263; Tue, 14 Jan 2020 13:50:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579038605; cv=none; d=google.com; s=arc-20160816; b=KCARCFEow4gMuLwLoseeS1kTROLnvBWfOI8Pt5LHk+ClPTbnQeAEx/oVh8yvAtG6Es lwN42L1gv1MQ026nc8EPf1U3xJr1IjMbtDi9anGQ/LAuLuywroQWCKU4105ZmgVM21DP hizpW6p0ihBI1TdHAa/K8P4UcaMf1tCjC/4EMbiih7wL6aM2ivkQsLe7XDwNEo4Dbkc+ i7fg9kJdm6xdffBDTbBicEeutDC0dcSdAx516zi9EZfDoNRK9H6OZORtSoPGZ2J4xi31 NEAbwHxyl4eFNnIGYDLpD3v39DRtiAcbPeWeIJtXVKDsBWL1ay9LpxH0F31/KkYYOetN ZStQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=eeLu6kAlUCUtRtKhcbOJBvaZEpWXEUjKbyoor2fD4No=; b=IKvTkMvlinWQj1G6pXQqnBWyaLa1JMKq+OrrFssIP1EFKN5Vb5qNMY0rpn7gmgy0TY KcunVuBiixIxodYCrMZ5QulzJUlJcplXDMcxZtJt4VakIZPkAma27lcYL1/EMY5YD8ez QNkxU5PXer9OCE10qWYIuAruiPomymK8ovaHyXFZwxHPxikmgoQ1lgJIaJyyuo5DAcj5 sJuvh1iQM5OAVKG+1+kwjuLDYOCMQMqkYcW5n+ED2O7UAbqgZxOUW5C2g8rIsL8FqwDM DUwxRxOmC+7jfrZDt+Oc52I/zKzAcRWGl/LEJ1L6YF8f7PpWJ65vgo/MD+AzTsZJ1a32 mndQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e13si9773226otp.164.2020.01.14.13.49.52; Tue, 14 Jan 2020 13:50:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728883AbgANVsZ (ORCPT + 99 others); Tue, 14 Jan 2020 16:48:25 -0500 Received: from inva021.nxp.com ([92.121.34.21]:54864 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbgANVsY (ORCPT ); Tue, 14 Jan 2020 16:48:24 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6EF77201224; Tue, 14 Jan 2020 22:48:22 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6F4B02004FB; Tue, 14 Jan 2020 22:48:16 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id E635D402AE; Wed, 15 Jan 2020 05:48:08 +0800 (SGT) From: Han Xu To: vkoul@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, esben@geanix.com, boris.brezillon@collabora.com Cc: festevam@gmail.com, linux-imx@nxp.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, han.xu@nxp.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] dmaengine: mxs: add the remove function Date: Wed, 15 Jan 2020 05:43:59 +0800 Message-Id: <1579038243-28550-3-git-send-email-han.xu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1579038243-28550-1-git-send-email-han.xu@nxp.com> References: <1579038243-28550-1-git-send-email-han.xu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org add the remove function for mxs-dma Signed-off-by: Han Xu --- drivers/dma/mxs-dma.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 9deaaf4fc58f..b458f06f9067 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -863,6 +863,22 @@ static int mxs_dma_probe(struct platform_device *pdev) return 0; } +static int mxs_dma_remove(struct platform_device *pdev) +{ + struct mxs_dma_engine *mxs_dma = platform_get_drvdata(pdev); + int i; + + dma_async_device_unregister(&mxs_dma->dma_device); + + for (i = 0; i < MXS_DMA_CHANNELS; i++) { + struct mxs_dma_chan *mxs_chan = &mxs_dma->mxs_chans[i]; + + tasklet_kill(&mxs_chan->tasklet); + } + + return 0; +} + static struct platform_driver mxs_dma_driver = { .driver = { .name = "mxs-dma", @@ -870,6 +886,7 @@ static struct platform_driver mxs_dma_driver = { }, .id_table = mxs_dma_ids, .probe = mxs_dma_probe, + .remove = mxs_dma_remove, }; module_platform_driver(mxs_dma_driver); -- 2.17.1