From patchwork Fri Aug 3 07:19:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1AE2157D for ; Fri, 3 Aug 2018 07:21:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4BBF2C639 for ; Fri, 3 Aug 2018 07:21:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2C1B2C451; Fri, 3 Aug 2018 07:21:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED3FE2C639 for ; Fri, 3 Aug 2018 07:21:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728040AbeHCJQL (ORCPT ); Fri, 3 Aug 2018 05:16:11 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:56587 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728033AbeHCJQL (ORCPT ); Fri, 3 Aug 2018 05:16:11 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 04DCC13ED1C8E; Fri, 3 Aug 2018 15:24:49 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id A0Z3kgtpprml; Fri, 3 Aug 2018 15:24:47 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 42D0513ED1C88; Fri, 3 Aug 2018 15:24:47 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 42D0513ED1C88 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281087; bh=zT0yr/2y1bafwx2D4ro8vCwnXIfhv+I+MXgsXjZqfAs=; h=From:To:Subject:Date:Message-Id; b=iYDGbPUBiPrkR7ZZbALJK0FzCjNl8LvyJcfqMJH3tQV8a2xraDzeVgZspDEP56rbR 6dah+kBzmjGW5Y1ygsV7QU7B8BKzgl3pNL9u66lx+rekc8uwXhNntzUtwEmqdN0NlA RYp4ziWfEUmnqNGqkAMskLLYFp6FbVbe2ZZiPZEo= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lm2U5uAs6_2z; Fri, 3 Aug 2018 15:24:46 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 7161713ED1C84; Fri, 3 Aug 2018 15:24:45 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 01/46] dmaengine: zx_dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:31 +0800 Message-Id: <20180803072016.21544-2-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register() to simplify the code. Remove the code calling dma_async_device_unregister(). Signed-off-by: Huang Shijie --- drivers/dma/zx_dma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/zx_dma.c b/drivers/dma/zx_dma.c index 2571bc7693df..7febd20113ef 100644 --- a/drivers/dma/zx_dma.c +++ b/drivers/dma/zx_dma.c @@ -861,20 +861,18 @@ static int zx_dma_probe(struct platform_device *op) INIT_LIST_HEAD(&d->chan_pending); platform_set_drvdata(op, d); - ret = dma_async_device_register(&d->slave); + ret = dmaenginem_async_device_register(&d->slave); if (ret) goto clk_dis; ret = of_dma_controller_register((&op->dev)->of_node, zx_of_dma_simple_xlate, d); if (ret) - goto of_dma_register_fail; + goto clk_dis; dev_info(&op->dev, "initialized\n"); return 0; -of_dma_register_fail: - dma_async_device_unregister(&d->slave); clk_dis: clk_disable_unprepare(d->clk); zx_dma_out: @@ -889,7 +887,6 @@ static int zx_dma_remove(struct platform_device *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); list_for_each_entry_safe(c, cn, &d->slave.channels, From patchwork Fri Aug 3 07:19:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554755 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B70E913BB for ; Fri, 3 Aug 2018 07:26:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EF2E28842 for ; Fri, 3 Aug 2018 07:26:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 935262C5B7; Fri, 3 Aug 2018 07:26:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39BD82C4A9 for ; Fri, 3 Aug 2018 07:26:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728598AbeHCJQL (ORCPT ); Fri, 3 Aug 2018 05:16:11 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:56605 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727469AbeHCJQL (ORCPT ); Fri, 3 Aug 2018 05:16:11 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 06C2F13ED1C8F; Fri, 3 Aug 2018 15:24:49 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id gk_mlFXdSif2; Fri, 3 Aug 2018 15:24:48 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id EA4E713ED1C85; Fri, 3 Aug 2018 15:24:47 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai EA4E713ED1C85 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281088; bh=tsvBMsz4bijPp+o6e6buBVY4shM8yWACpM9P13bCdP0=; h=From:To:Subject:Date:Message-Id; b=kVoiZ7trOqfgeB62yejCiuV604ukS4FrVRpzgEDEdtVMKOcxXx5p9zB/PpLcj2uZB StO1svXBJhHwS99LqWqXkvnuR0AQRSoPWd+4IQM2oQzlosRY4Fer8lR5LvlsWeMms1 rw3hzC02js4Yv73mcz4d0jDvPIegiGkVoBmW61js= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yBz8o6JiQxuV; Fri, 3 Aug 2018 15:24:47 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 7697F13ED1C87; Fri, 3 Aug 2018 15:24:46 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 02/46] dmaengine: zynqmp_dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:32 +0800 Message-Id: <20180803072016.21544-3-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code, remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/xilinx/zynqmp_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c index c74a88b65039..acfc74b68717 100644 --- a/drivers/dma/xilinx/zynqmp_dma.c +++ b/drivers/dma/xilinx/zynqmp_dma.c @@ -1085,13 +1085,12 @@ static int zynqmp_dma_probe(struct platform_device *pdev) p->dst_addr_widths = BIT(zdev->chan->bus_width / 8); p->src_addr_widths = BIT(zdev->chan->bus_width / 8); - dma_async_device_register(&zdev->common); + dmaenginem_async_device_register(&zdev->common); ret = of_dma_controller_register(pdev->dev.of_node, of_zynqmp_dma_xlate, zdev); if (ret) { dev_err(&pdev->dev, "Unable to register DMA to DT\n"); - dma_async_device_unregister(&zdev->common); goto free_chan_resources; } @@ -1122,7 +1121,6 @@ static int zynqmp_dma_remove(struct platform_device *pdev) struct zynqmp_dma_device *zdev = platform_get_drvdata(pdev); of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&zdev->common); zynqmp_dma_chan_remove(zdev->chan); pm_runtime_disable(zdev->dev); From patchwork Fri Aug 3 07:19:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554753 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 278A4A637 for ; Fri, 3 Aug 2018 07:26:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EAEB28842 for ; Fri, 3 Aug 2018 07:26:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01D142C5B7; Fri, 3 Aug 2018 07:26:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1F6328842 for ; Fri, 3 Aug 2018 07:26:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729357AbeHCJQM (ORCPT ); Fri, 3 Aug 2018 05:16:12 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:56620 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727860AbeHCJQL (ORCPT ); Fri, 3 Aug 2018 05:16:11 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 5CE9613ED1C88; Fri, 3 Aug 2018 15:24:49 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id xtBoARfdOPR8; Fri, 3 Aug 2018 15:24:49 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id DA7E113ED1C8D; Fri, 3 Aug 2018 15:24:48 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai DA7E113ED1C8D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281088; bh=F33xm6M0PmgJhj0I9FWkzwTHSkkQ4tkLbOJX0yHkoAE=; h=From:To:Subject:Date:Message-Id; b=B/ivTNjITH4zedkfbTzyKhw4lL3EWIjBVvQgU7BTMTUq68sOu2kM+XIi3yPAUb4d6 bau+/3dcat17khYXV2BixMx1d3y8lZds5MGUyzyzP6k8KK2SbWf+c494O6/pD2GDiF qFDlfBOSblmbpJju9pSzB4j00Eav61DNw14A+eCA= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pPOHSV7LhCj5; Fri, 3 Aug 2018 15:24:48 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id A553913ED1C84; Fri, 3 Aug 2018 15:24:47 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 03/46] dmaengine: xilinx_dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:33 +0800 Message-Id: <20180803072016.21544-4-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code, remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/xilinx/xilinx_dma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index c12442312595..97ffeb5e59bb 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -2705,13 +2705,12 @@ static int xilinx_dma_probe(struct platform_device *pdev) } /* Register the DMA engine with the core */ - dma_async_device_register(&xdev->common); + dmaenginem_async_device_register(&xdev->common); err = of_dma_controller_register(node, of_dma_xilinx_xlate, xdev); if (err < 0) { dev_err(&pdev->dev, "Unable to register DMA to DT\n"); - dma_async_device_unregister(&xdev->common); goto error; } @@ -2747,8 +2746,6 @@ static int xilinx_dma_remove(struct platform_device *pdev) of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&xdev->common); - for (i = 0; i < xdev->nr_channels; i++) if (xdev->chan[i]) xilinx_dma_chan_remove(xdev->chan[i]); From patchwork Fri Aug 3 07:19:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554739 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 339CDA637 for ; Fri, 3 Aug 2018 07:25:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B20728842 for ; Fri, 3 Aug 2018 07:25:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0EC022C610; Fri, 3 Aug 2018 07:25:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABC412C4A9 for ; Fri, 3 Aug 2018 07:25:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732190AbeHCJQZ (ORCPT ); Fri, 3 Aug 2018 05:16:25 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:56904 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728037AbeHCJQY (ORCPT ); Fri, 3 Aug 2018 05:16:24 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 86D3513ED1C8B; Fri, 3 Aug 2018 15:24:51 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id pmyv79IRMPo1; Fri, 3 Aug 2018 15:24:51 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 2C9911426302A; Fri, 3 Aug 2018 15:24:51 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 2C9911426302A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281091; bh=WzThypY3aHZFrYCGZ8MYs7dbvijbeImufOZ05zxOfxs=; h=From:To:Subject:Date:Message-Id; b=qCwZ3XqmEPn0O+jHP599a/jyl/OUhF/r51qFdQhxvlP6JoSDixQup5+pWdiUh+yUx m7BxlZJLURh1wTg24PhznIteXonwLMPI75x3l3nJwxHc0yH0u/cJB8R7g/ltlsUN3u HnkD6JCTTUBOuEbazWcatmTePa48V4cleoHSfVPo= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mckgFgI-RwEv; Fri, 3 Aug 2018 15:24:51 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id D733E13ED1C8B; Fri, 3 Aug 2018 15:24:48 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 04/46] dmaengine: xgene-dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:34 +0800 Message-Id: <20180803072016.21544-5-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove xgene_dma_async_register remove dma_async_device_unregister Signed-off-by: Huang Shijie --- drivers/dma/xgene-dma.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/dma/xgene-dma.c b/drivers/dma/xgene-dma.c index 1d5988849aa6..192322bbdc29 100644 --- a/drivers/dma/xgene-dma.c +++ b/drivers/dma/xgene-dma.c @@ -1564,7 +1564,7 @@ static int xgene_dma_async_register(struct xgene_dma *pdma, int id) list_add_tail(&chan->dma_chan.device_node, &dma_dev->channels); /* Register with Linux async DMA framework*/ - ret = dma_async_device_register(dma_dev); + ret = dmaenginem_async_device_register(dma_dev); if (ret) { chan_err(chan, "Failed to register async device %d", ret); tasklet_kill(&chan->tasklet); @@ -1588,10 +1588,8 @@ static int xgene_dma_init_async(struct xgene_dma *pdma) for (i = 0; i < XGENE_DMA_MAX_CHANNEL ; i++) { ret = xgene_dma_async_register(pdma, i); if (ret) { - for (j = 0; j < i; j++) { - dma_async_device_unregister(&pdma->dma_dev[j]); + for (j = 0; j < i; j++) tasklet_kill(&pdma->chan[j].tasklet); - } return ret; } @@ -1600,14 +1598,6 @@ static int xgene_dma_init_async(struct xgene_dma *pdma) return ret; } -static void xgene_dma_async_unregister(struct xgene_dma *pdma) -{ - int i; - - for (i = 0; i < XGENE_DMA_MAX_CHANNEL; i++) - dma_async_device_unregister(&pdma->dma_dev[i]); -} - static void xgene_dma_init_channels(struct xgene_dma *pdma) { struct xgene_dma_chan *chan; @@ -1796,8 +1786,6 @@ static int xgene_dma_remove(struct platform_device *pdev) struct xgene_dma_chan *chan; int i; - xgene_dma_async_unregister(pdma); - /* Mask interrupts and disable DMA engine */ xgene_dma_mask_interrupts(pdma); xgene_dma_disable(pdma); From patchwork Fri Aug 3 07:19:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554749 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D983A637 for ; Fri, 3 Aug 2018 07:26:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0376228842 for ; Fri, 3 Aug 2018 07:26:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB5522C5F7; Fri, 3 Aug 2018 07:26:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FE2428842 for ; Fri, 3 Aug 2018 07:26:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729859AbeHCJQQ (ORCPT ); Fri, 3 Aug 2018 05:16:16 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57165 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727860AbeHCJQO (ORCPT ); Fri, 3 Aug 2018 05:16:14 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id B313B107081C3; Fri, 3 Aug 2018 15:24:52 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ySt_aobsaY1l; Fri, 3 Aug 2018 15:24:52 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 5382D107081C0; Fri, 3 Aug 2018 15:24:52 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 5382D107081C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281092; bh=AuYl1ulqWH7OcoD9TefNAwqylFfF8nf6isSlVfTBlXc=; h=From:To:Subject:Date:Message-Id; b=fX+cHGOMOWxAnXSkOHM8gPQSuJIUo3OzAllPRnHxBlf7iKuBu1nzkBI5XEFRo3DH4 E7dfJpZpWIzMSqNlnpMC176DwetgyXPyKQWdSJFSZyANE+K6mo3g+plVtkjDyt3s/z Gi8gNwYp5NbSCNCcFgxJQvIiSdiHCeWzCzm/f8aE= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Y1yumzJzBsEl; Fri, 3 Aug 2018 15:24:52 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 19E5F13ED1C92; Fri, 3 Aug 2018 15:24:51 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 05/46] dmaengine: txx9dmac: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:35 +0800 Message-Id: <20180803072016.21544-6-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister Signed-off-by: Huang Shijie --- drivers/dma/txx9dmac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c index eb45af71d3a3..1e97bee485d7 100644 --- a/drivers/dma/txx9dmac.c +++ b/drivers/dma/txx9dmac.c @@ -1147,7 +1147,7 @@ static int __init txx9dmac_chan_probe(struct platform_device *pdev) platform_set_drvdata(pdev, dc); - err = dma_async_device_register(&dc->dma); + err = dmaenginem_async_device_register(&dc->dma); if (err) return err; dev_dbg(&pdev->dev, "TXx9 DMA Channel (dma%d%s%s)\n", @@ -1162,8 +1162,6 @@ static int txx9dmac_chan_remove(struct platform_device *pdev) { struct txx9dmac_chan *dc = platform_get_drvdata(pdev); - - dma_async_device_unregister(&dc->dma); if (dc->irq >= 0) { devm_free_irq(&pdev->dev, dc->irq, dc); tasklet_kill(&dc->tasklet); From patchwork Fri Aug 3 07:19:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 04172A637 for ; Fri, 3 Aug 2018 07:25:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF2AB28842 for ; Fri, 3 Aug 2018 07:25:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2F3A2C5B7; Fri, 3 Aug 2018 07:25:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 848B228842 for ; Fri, 3 Aug 2018 07:25:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730848AbeHCJQR (ORCPT ); Fri, 3 Aug 2018 05:16:17 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57164 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729808AbeHCJQQ (ORCPT ); Fri, 3 Aug 2018 05:16:16 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 5CFE1107081C5; Fri, 3 Aug 2018 15:24:53 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id vKU63yUJzV6Y; Fri, 3 Aug 2018 15:24:53 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 0372E107081C8; Fri, 3 Aug 2018 15:24:53 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 0372E107081C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281093; bh=KDphEuHxfEV/bQvjVHae/IdvTgCB2O1z5hhVDSG7hJY=; h=From:To:Subject:Date:Message-Id; b=GBoX8swUjtj6ZjYON+03gJcJEDss1/oWCTeH/Eb+pdUglUAEAvfuNbW87F61McP2V hcz9UYQS7TnoCeDaNyU/i6x5Vwnyeq4yr9z+CERcMQaYQewcie5Y2vbweFEgL8zDKw WThu/a6vRJWVECiugF9RQ7zJus5AW5844nw4xPKE= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 75pcs9RCdl3c; Fri, 3 Aug 2018 15:24:52 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 43ED1107081C2; Fri, 3 Aug 2018 15:24:52 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 06/46] dmaengine: timb_dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:36 +0800 Message-Id: <20180803072016.21544-7-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister Signed-off-by: Huang Shijie --- drivers/dma/timb_dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c index 395c698edb4d..39e1ba2347db 100644 --- a/drivers/dma/timb_dma.c +++ b/drivers/dma/timb_dma.c @@ -723,7 +723,7 @@ static int td_probe(struct platform_device *pdev) list_add_tail(&td_chan->chan.device_node, &td->dma.channels); } - err = dma_async_device_register(&td->dma); + err = dmaenginem_async_device_register(&td->dma); if (err) { dev_err(&pdev->dev, "Failed to register async device\n"); goto err_free_irq; @@ -754,7 +754,6 @@ static int td_remove(struct platform_device *pdev) struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); int irq = platform_get_irq(pdev, 0); - dma_async_device_unregister(&td->dma); free_irq(irq, td); tasklet_kill(&td->tasklet); iounmap(td->membase); From patchwork Fri Aug 3 07:19:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CFF41708 for ; Fri, 3 Aug 2018 07:25:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83D7028842 for ; Fri, 3 Aug 2018 07:25:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 773FA2C5B7; Fri, 3 Aug 2018 07:25:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2526B28842 for ; Fri, 3 Aug 2018 07:25:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731619AbeHCJQS (ORCPT ); Fri, 3 Aug 2018 05:16:18 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57209 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729792AbeHCJQR (ORCPT ); Fri, 3 Aug 2018 05:16:17 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id E6ED8107081CC; Fri, 3 Aug 2018 15:24:53 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id dxKGkpg-xTKa; Fri, 3 Aug 2018 15:24:53 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 9D155107081C7; Fri, 3 Aug 2018 15:24:53 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 9D155107081C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281093; bh=lmY3Ee6I4l55uOi6Yl0NoD2F8CrnxNhjQ8hVQIhitnE=; h=From:To:Subject:Date:Message-Id; b=KelGrU/VaOUj6eo+hXrwNe+3E77Zt28MHaWqzXt7VVdj14+JW04fkgZELVWkx0/nb 3UEGxZttPpFySSrAIUhh90XvWZJA2hQRijIiLMzOjOvW+q164gAwywhIHFRpWtfOoR cIqPVw0gUtdMmhMfZKyupua2EBsdKgZl8P57r5EE= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id B-O7bpkO8Byy; Fri, 3 Aug 2018 15:24:53 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id E4779107081C0; Fri, 3 Aug 2018 15:24:52 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 07/46] dmaengine: omap-dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:37 +0800 Message-Id: <20180803072016.21544-8-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister Signed-off-by: Huang Shijie --- drivers/dma/ti/omap-dma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/dma/ti/omap-dma.c b/drivers/dma/ti/omap-dma.c index a4a931ddf6f6..085748c6eb67 100644 --- a/drivers/dma/ti/omap-dma.c +++ b/drivers/dma/ti/omap-dma.c @@ -1566,7 +1566,7 @@ static int omap_dma_probe(struct platform_device *pdev) } } - rc = dma_async_device_register(&od->ddev); + rc = dmaenginem_async_device_register(&od->ddev); if (rc) { pr_warn("OMAP-DMA: failed to register slave DMA engine device: %d\n", rc); @@ -1584,7 +1584,6 @@ static int omap_dma_probe(struct platform_device *pdev) of_dma_simple_xlate, &omap_dma_info); if (rc) { pr_warn("OMAP-DMA: failed to register DMA controller\n"); - dma_async_device_unregister(&od->ddev); omap_dma_free(od); } } @@ -1606,8 +1605,6 @@ static int omap_dma_remove(struct platform_device *pdev) irq = platform_get_irq(pdev, 1); devm_free_irq(&pdev->dev, irq, od); - dma_async_device_unregister(&od->ddev); - if (!od->legacy) { /* Disable all interrupts */ omap_dma_glbl_write(od, IRQENABLE_L0, 0); From patchwork Fri Aug 3 07:19:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0128113BB for ; Fri, 3 Aug 2018 07:25:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC3D128842 for ; Fri, 3 Aug 2018 07:25:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFA442C5B7; Fri, 3 Aug 2018 07:25:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CC6328842 for ; Fri, 3 Aug 2018 07:25:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732067AbeHCJQV (ORCPT ); Fri, 3 Aug 2018 05:16:21 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57210 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727811AbeHCJQV (ORCPT ); Fri, 3 Aug 2018 05:16:21 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 402B7107081CB; Fri, 3 Aug 2018 15:24:55 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id hpnu-aZgwmDI; Fri, 3 Aug 2018 15:24:55 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id E116A107081D6; Fri, 3 Aug 2018 15:24:54 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai E116A107081D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281094; bh=JEg5tyXOeuWx5L8ppkqWYiCgCykzI9Su9e/d2v/AgjI=; h=From:To:Subject:Date:Message-Id; b=rWQ0k1cDcyQZRvvRsOGUBLOjKw8kZALPn7PW3ylN0VKngPwGm+DLg+yNAgr131e6r bwVXXONRsVAcnUyVJMtKGTjgf2ivMQiMvh9CRP1hBNmEne4f8JOlcAB0m03IGQniDe W4VrvSMN7wflCxkC09oZvDxRi1wnpwLasW4txJME= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id YeGzlsy4dTJP; Fri, 3 Aug 2018 15:24:54 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 92BCF107081CB; Fri, 3 Aug 2018 15:24:53 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 08/46] dmaengine: edma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:38 +0800 Message-Id: <20180803072016.21544-9-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister Signed-off-by: Huang Shijie --- drivers/dma/ti/edma.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c index ceabdea40ae0..28ba1e722c47 100644 --- a/drivers/dma/ti/edma.c +++ b/drivers/dma/ti/edma.c @@ -2388,18 +2388,17 @@ static int edma_probe(struct platform_device *pdev) ecc->dma_slave.filter.mapcnt = info->slavecnt; ecc->dma_slave.filter.fn = edma_filter_fn; - ret = dma_async_device_register(&ecc->dma_slave); + ret = dmaenginem_async_device_register(&ecc->dma_slave); if (ret) { dev_err(dev, "slave ddev registration failed (%d)\n", ret); goto err_reg1; } if (ecc->dma_memcpy) { - ret = dma_async_device_register(ecc->dma_memcpy); + ret = dmaenginem_async_device_register(ecc->dma_memcpy); if (ret) { dev_err(dev, "memcpy ddev registration failed (%d)\n", ret); - dma_async_device_unregister(&ecc->dma_slave); goto err_reg1; } } @@ -2439,9 +2438,6 @@ static int edma_remove(struct platform_device *pdev) if (dev->of_node) of_dma_controller_free(dev->of_node); - dma_async_device_unregister(&ecc->dma_slave); - if (ecc->dma_memcpy) - dma_async_device_unregister(ecc->dma_memcpy); edma_free_slot(ecc, ecc->dummy_slot); return 0; From patchwork Fri Aug 3 07:19:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3BFF913BB for ; Fri, 3 Aug 2018 07:22:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20588286B0 for ; Fri, 3 Aug 2018 07:22:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1286F2883A; Fri, 3 Aug 2018 07:22:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94DE2286B0 for ; Fri, 3 Aug 2018 07:22:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732649AbeHCJQt (ORCPT ); Fri, 3 Aug 2018 05:16:49 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57244 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729813AbeHCJQt (ORCPT ); Fri, 3 Aug 2018 05:16:49 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 43261107081D5; Fri, 3 Aug 2018 15:24:56 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Bko_pmyfqmv0; Fri, 3 Aug 2018 15:24:56 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id BEE2A107081D0; Fri, 3 Aug 2018 15:24:55 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai BEE2A107081D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281095; bh=F+49CsiicXwSAQTxB0GG4z7Cl9pIEsQPRQxX9QgEffE=; h=From:To:Subject:Date:Message-Id; b=K2C9q9BMu3xmW1sCoxuGDW/vsCvsZBJTg1LfvpNDFqFGC8GwMYBDxmq/pAImtkAot cDI91SPdFRoggpzVJqL6J5KupPRZicM8u3htYn7X6z02XzCA47wHMxmu4oDs7c4KiD 9KRdl8recV9xLYKjtNvUHhbvHcPp84ZCuLkuqkuc= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id g7z6qFEuj1GH; Fri, 3 Aug 2018 15:24:55 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id D2692107081CD; Fri, 3 Aug 2018 15:24:54 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 09/46] dmaengine: cppi41: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:39 +0800 Message-Id: <20180803072016.21544-10-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister Signed-off-by: Huang Shijie --- drivers/dma/ti/cppi41.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/ti/cppi41.c b/drivers/dma/ti/cppi41.c index 1497da367710..d2998a19ed2e 100644 --- a/drivers/dma/ti/cppi41.c +++ b/drivers/dma/ti/cppi41.c @@ -1096,21 +1096,19 @@ static int cppi41_dma_probe(struct platform_device *pdev) goto err_chans; cdd->irq = irq; - ret = dma_async_device_register(&cdd->ddev); + ret = dmaenginem_async_device_register(&cdd->ddev); if (ret) goto err_chans; ret = of_dma_controller_register(dev->of_node, cppi41_dma_xlate, &cpp41_dma_info); if (ret) - goto err_of; + goto err_chans; pm_runtime_mark_last_busy(dev); pm_runtime_put_autosuspend(dev); return 0; -err_of: - dma_async_device_unregister(&cdd->ddev); err_chans: deinit_cppi41(dev, cdd); err_init_cppi: @@ -1132,7 +1130,6 @@ static int cppi41_dma_remove(struct platform_device *pdev) dev_err(&pdev->dev, "%s could not pm_runtime_get: %i\n", __func__, error); of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&cdd->ddev); devm_free_irq(&pdev->dev, cdd->irq, cdd); deinit_cppi41(&pdev->dev, cdd); From patchwork Fri Aug 3 07:19:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1892413BB for ; Fri, 3 Aug 2018 07:25:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F36F52C5B7 for ; Fri, 3 Aug 2018 07:25:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7F822C5EC; Fri, 3 Aug 2018 07:25:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AB3E28842 for ; Fri, 3 Aug 2018 07:25:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732207AbeHCJQZ (ORCPT ); Fri, 3 Aug 2018 05:16:25 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57298 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729811AbeHCJQY (ORCPT ); Fri, 3 Aug 2018 05:16:24 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 14DF7107081DF; Fri, 3 Aug 2018 15:24:58 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id KKMlbiDt_jml; Fri, 3 Aug 2018 15:24:56 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 9A682107081CA; Fri, 3 Aug 2018 15:24:56 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 9A682107081CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281096; bh=7M8YDrOHWJpB7tzyFl2kdYvU8LWK3PVxCFkytWw8lpA=; h=From:To:Subject:Date:Message-Id; b=KgxgCQodreLHPuFjrX8npWNMgmv7QXajAnelDEl33jFVaw1WDTOJKPLvAwO+q9EKL s9HzFbKX8I7mcaO2ruI7xsl11brtFRUKOhzEURKNXoxg75rZ5Dwj7v1LJaixVKI7Yj AZ1kAGfSD71M3mg8sZ7ZHMmQl3D3eIItvc81/Ca8= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2A8JbPuqQOyp; Fri, 3 Aug 2018 15:24:56 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id AB109107081C4; Fri, 3 Aug 2018 15:24:55 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 10/46] dmaengine: tegra210-adma: use helper dmaenginem_async_device_register Date: Fri, 3 Aug 2018 15:19:40 +0800 Message-Id: <20180803072016.21544-11-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister remove the label dma_remove Signed-off-by: Huang Shijie --- drivers/dma/tegra210-adma.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c index b26256f23d67..bd99f12a00e3 100644 --- a/drivers/dma/tegra210-adma.c +++ b/drivers/dma/tegra210-adma.c @@ -746,7 +746,7 @@ static int tegra_adma_probe(struct platform_device *pdev) tdma->dma_dev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); tdma->dma_dev.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT; - ret = dma_async_device_register(&tdma->dma_dev); + ret = dmaenginem_async_device_register(&tdma->dma_dev); if (ret < 0) { dev_err(&pdev->dev, "ADMA registration failed: %d\n", ret); goto irq_dispose; @@ -756,7 +756,7 @@ static int tegra_adma_probe(struct platform_device *pdev) tegra_dma_of_xlate, tdma); if (ret < 0) { dev_err(&pdev->dev, "ADMA OF registration failed %d\n", ret); - goto dma_remove; + goto irq_dispose; } pm_runtime_put(&pdev->dev); @@ -766,8 +766,6 @@ static int tegra_adma_probe(struct platform_device *pdev) return 0; -dma_remove: - dma_async_device_unregister(&tdma->dma_dev); irq_dispose: while (--i >= 0) irq_dispose_mapping(tdma->channels[i].irq); @@ -786,8 +784,6 @@ static int tegra_adma_remove(struct platform_device *pdev) struct tegra_adma *tdma = platform_get_drvdata(pdev); int i; - dma_async_device_unregister(&tdma->dma_dev); - for (i = 0; i < tdma->nr_channels; ++i) irq_dispose_mapping(tdma->channels[i].irq); From patchwork Fri Aug 3 07:19:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554741 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9C2D51708 for ; Fri, 3 Aug 2018 07:25:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8267428842 for ; Fri, 3 Aug 2018 07:25:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7460C2C5B7; Fri, 3 Aug 2018 07:25:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1375628842 for ; Fri, 3 Aug 2018 07:25:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732669AbeHCJUi (ORCPT ); Fri, 3 Aug 2018 05:20:38 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57165 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729808AbeHCJQZ (ORCPT ); Fri, 3 Aug 2018 05:16:25 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 90B1A107081CA; Fri, 3 Aug 2018 15:24:58 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id HVC-IuNmFMX2; Fri, 3 Aug 2018 15:24:58 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 25892107081E1; Fri, 3 Aug 2018 15:24:58 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 25892107081E1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281098; bh=Z+SOxwgabn0PZIzvevtjxhyKnCRTzlMyJFOK4zpfag8=; h=From:To:Subject:Date:Message-Id; b=XeUUvuyXcXnudTcMkd0+m5u0JP6bmotanJa8ezZlTsx2usPv3G2aokN7YwehQF9kp m6/IYIUYXUCzxlzzyY5WHjy5gw/qcBeZwWHd9MmpsSwu69GGF0+jt2YgczNC4Jf33P imdSFGaBIPBv5Vyvo1nbcQN2CvZl5iUKtTK3hpyQ= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AFbxfcYPAj19; Fri, 3 Aug 2018 15:24:57 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id BBF9B107081C4; Fri, 3 Aug 2018 15:24:56 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 11/46] dmaengine: tegra20-apb-dma: use helper dmaenginem_async_device_register Date: Fri, 3 Aug 2018 15:19:41 +0800 Message-Id: <20180803072016.21544-12-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister remove the label err_unregister_dma_dev Signed-off-by: Huang Shijie --- drivers/dma/tegra20-apb-dma.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index 9a558e30c461..9f6f51abbeef 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c @@ -1444,7 +1444,7 @@ static int tegra_dma_probe(struct platform_device *pdev) tdma->dma_dev.device_tx_status = tegra_dma_tx_status; tdma->dma_dev.device_issue_pending = tegra_dma_issue_pending; - ret = dma_async_device_register(&tdma->dma_dev); + ret = dmaenginem_async_device_register(&tdma->dma_dev); if (ret < 0) { dev_err(&pdev->dev, "Tegra20 APB DMA driver registration failed %d\n", ret); @@ -1456,15 +1456,13 @@ static int tegra_dma_probe(struct platform_device *pdev) if (ret < 0) { dev_err(&pdev->dev, "Tegra20 APB DMA OF registration failed %d\n", ret); - goto err_unregister_dma_dev; + goto err_irq; } dev_info(&pdev->dev, "Tegra20 APB DMA driver register %d channels\n", cdata->nr_channels); return 0; -err_unregister_dma_dev: - dma_async_device_unregister(&tdma->dma_dev); err_irq: while (--i >= 0) { struct tegra_dma_channel *tdc = &tdma->channels[i]; @@ -1485,8 +1483,6 @@ static int tegra_dma_remove(struct platform_device *pdev) int i; struct tegra_dma_channel *tdc; - dma_async_device_unregister(&tdma->dma_dev); - for (i = 0; i < tdma->chip_data->nr_channels; ++i) { tdc = &tdma->channels[i]; free_irq(tdc->irq, tdc); From patchwork Fri Aug 3 07:19:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554733 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 976C013BB for ; Fri, 3 Aug 2018 07:25:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EB9228842 for ; Fri, 3 Aug 2018 07:25:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 724702C5B7; Fri, 3 Aug 2018 07:25:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A3A728842 for ; Fri, 3 Aug 2018 07:25:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732357AbeHCJQ1 (ORCPT ); Fri, 3 Aug 2018 05:16:27 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57164 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729792AbeHCJQ0 (ORCPT ); Fri, 3 Aug 2018 05:16:26 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 38BD1107081E6; Fri, 3 Aug 2018 15:25:02 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 9Xtb-kLa-cMJ; Fri, 3 Aug 2018 15:25:01 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 36406107081EA; Fri, 3 Aug 2018 15:24:59 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 36406107081EA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281099; bh=NJv+olFHX2YCF2+oZqo7kxe07VRNXEfRgtCOC357ldA=; h=From:To:Subject:Date:Message-Id; b=eII7g+3QEtUyBOviw57tBfUN4hPMPGdzYkGqn5wHxswNBpV1cbVlOvjbBGQ5BzmvF rc7gOsERRtc7+DCHhRZ7jHtRQt32TksbPpY+mPMJioSfVT4oqq0c5KrhQ3SAOWjqHn QH9KVShK4rrk14NNmm+hDnPOBoZByAgVe8DoXDiY= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fsF29KP6y11h; Fri, 3 Aug 2018 15:24:59 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 230A9107081E0; Fri, 3 Aug 2018 15:24:58 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 12/46] dmaengine: sun6i-dma: use helper dmaenginem_async_device_register Date: Fri, 3 Aug 2018 15:19:42 +0800 Message-Id: <20180803072016.21544-13-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister remove the label err_dma_unregister Signed-off-by: Huang Shijie --- drivers/dma/sun6i-dma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index 0cd13f17fc11..419d6090f9e1 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -1319,7 +1319,7 @@ static int sun6i_dma_probe(struct platform_device *pdev) goto err_clk_disable; } - ret = dma_async_device_register(&sdc->slave); + ret = dmaenginem_async_device_register(&sdc->slave); if (ret) { dev_warn(&pdev->dev, "Failed to register DMA engine device\n"); goto err_irq_disable; @@ -1329,7 +1329,7 @@ static int sun6i_dma_probe(struct platform_device *pdev) sdc); if (ret) { dev_err(&pdev->dev, "of_dma_controller_register failed\n"); - goto err_dma_unregister; + goto err_irq_disable; } if (sdc->cfg->clock_autogate_enable) @@ -1337,8 +1337,6 @@ static int sun6i_dma_probe(struct platform_device *pdev) return 0; -err_dma_unregister: - dma_async_device_unregister(&sdc->slave); err_irq_disable: sun6i_kill_tasklet(sdc); err_clk_disable: @@ -1355,7 +1353,6 @@ static int sun6i_dma_remove(struct platform_device *pdev) struct sun6i_dma_dev *sdc = platform_get_drvdata(pdev); of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&sdc->slave); sun6i_kill_tasklet(sdc); From patchwork Fri Aug 3 07:19:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554727 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EAB7A157D for ; Fri, 3 Aug 2018 07:25:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1F5E28842 for ; Fri, 3 Aug 2018 07:25:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C54F12C5B7; Fri, 3 Aug 2018 07:25:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B1C328842 for ; Fri, 3 Aug 2018 07:25:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728040AbeHCJQc (ORCPT ); Fri, 3 Aug 2018 05:16:32 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57627 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727811AbeHCJQc (ORCPT ); Fri, 3 Aug 2018 05:16:32 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 5B99B107081E8; Fri, 3 Aug 2018 15:25:02 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Cl0IAuMk5LhC; Fri, 3 Aug 2018 15:25:02 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 25607107081D1; Fri, 3 Aug 2018 15:25:01 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 25607107081D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281101; bh=2Wl9tdroIJqJALsEWvvhvKhC1PI5MGOFbNV/MalC9cQ=; h=From:To:Subject:Date:Message-Id; b=FXA/9YJ05WyceDvlm4fTF8x+ph8nPC1A17HeNZOkKMxAfxdcgX4wSeiLDjWr8f5iT 4AeIKOWFqvlmeiDMWwt0H/O73ywSffmGI+6zTl+ZszcYC49m+YnprFwlna5kHCrdOv pifVf6N4OJdP05JGJTsxBNg15yytHN2Uy2xlKWOU= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 5t74v1Xazy-I; Fri, 3 Aug 2018 15:25:01 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 025F8107081CD; Fri, 3 Aug 2018 15:24:58 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 13/46] dmaengine: sun4i-dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:43 +0800 Message-Id: <20180803072016.21544-14-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister remove label err_dma_unregister Signed-off-by: Huang Shijie --- drivers/dma/sun4i-dma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/sun4i-dma.c b/drivers/dma/sun4i-dma.c index f4ed3f17607c..c80a59c1fc38 100644 --- a/drivers/dma/sun4i-dma.c +++ b/drivers/dma/sun4i-dma.c @@ -1228,7 +1228,7 @@ static int sun4i_dma_probe(struct platform_device *pdev) goto err_clk_disable; } - ret = dma_async_device_register(&priv->slave); + ret = dmaenginem_async_device_register(&priv->slave); if (ret) { dev_warn(&pdev->dev, "Failed to register DMA engine device\n"); goto err_clk_disable; @@ -1238,15 +1238,13 @@ static int sun4i_dma_probe(struct platform_device *pdev) priv); if (ret) { dev_err(&pdev->dev, "of_dma_controller_register failed\n"); - goto err_dma_unregister; + goto err_clk_disable; } dev_dbg(&pdev->dev, "Successfully probed SUN4I_DMA\n"); return 0; -err_dma_unregister: - dma_async_device_unregister(&priv->slave); err_clk_disable: clk_disable_unprepare(priv->clk); return ret; @@ -1260,7 +1258,6 @@ static int sun4i_dma_remove(struct platform_device *pdev) disable_irq(priv->irq); of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&priv->slave); clk_disable_unprepare(priv->clk); From patchwork Fri Aug 3 07:19:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554735 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1215B15E9 for ; Fri, 3 Aug 2018 07:25:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC12228842 for ; Fri, 3 Aug 2018 07:25:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF68C2C5B7; Fri, 3 Aug 2018 07:25:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8596428842 for ; Fri, 3 Aug 2018 07:25:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732331AbeHCJQ1 (ORCPT ); Fri, 3 Aug 2018 05:16:27 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57672 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732037AbeHCJQ1 (ORCPT ); Fri, 3 Aug 2018 05:16:27 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id EBCBF107081F6; Fri, 3 Aug 2018 15:25:02 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Fcd5CGankdjo; Fri, 3 Aug 2018 15:25:02 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 48EFB107081E7; Fri, 3 Aug 2018 15:25:02 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 48EFB107081E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281102; bh=a1qn2bHhOmp+iyRhzBOZGhcKMtLLiGRrJzmthbdRUY8=; h=From:To:Subject:Date:Message-Id; b=fjoPjmT5S1yi7BV2DkWLoAUFS7ZIxxan75phbqmaEz6vK5EIWRBczHhA6Tu0EFliz 4iZ77UeTYh18cTIV2qkyc9xHgG1AqFqYWt11xx41Vdhn/dMiTNzXIyK4m2gphdzpbz GJurK9/8FOjI6UnIbeHtnWlfzwoyhi+Z4zmB1EHI= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id b3NDvqaSqr8i; Fri, 3 Aug 2018 15:25:02 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 1B558107081ED; Fri, 3 Aug 2018 15:25:01 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 14/46] dmaengine: coh901318: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:44 +0800 Message-Id: <20180803072016.21544-15-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister remove label err_register_of_dma,err_register_memcpy Signed-off-by: Huang Shijie --- drivers/dma/coh901318.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index da74fd74636b..ff29f2f6ce3b 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c @@ -2690,7 +2690,7 @@ static int __init coh901318_probe(struct platform_device *pdev) base->dma_slave.device_terminate_all = coh901318_terminate_all; base->dma_slave.dev = &pdev->dev; - err = dma_async_device_register(&base->dma_slave); + err = dmaenginem_async_device_register(&base->dma_slave); if (err) goto err_register_slave; @@ -2717,15 +2717,15 @@ static int __init coh901318_probe(struct platform_device *pdev) * i.e. 2^2 */ base->dma_memcpy.copy_align = DMAENGINE_ALIGN_4_BYTES; - err = dma_async_device_register(&base->dma_memcpy); + err = dmaenginem_async_device_register(&base->dma_memcpy); if (err) - goto err_register_memcpy; + goto err_register_slave; err = of_dma_controller_register(pdev->dev.of_node, coh901318_xlate, base); if (err) - goto err_register_of_dma; + goto err_register_slave; platform_set_drvdata(pdev, base); dev_info(&pdev->dev, "Initialized COH901318 DMA on virtual base 0x%p\n", @@ -2733,10 +2733,6 @@ static int __init coh901318_probe(struct platform_device *pdev) return err; - err_register_of_dma: - dma_async_device_unregister(&base->dma_memcpy); - err_register_memcpy: - dma_async_device_unregister(&base->dma_slave); err_register_slave: coh901318_pool_destroy(&base->pool); return err; @@ -2767,8 +2763,6 @@ static int coh901318_remove(struct platform_device *pdev) coh901318_base_remove(base, dma_memcpy_channels); of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&base->dma_memcpy); - dma_async_device_unregister(&base->dma_slave); coh901318_pool_destroy(&base->pool); return 0; } From patchwork Fri Aug 3 07:19:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554719 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 77B2A157D for ; Fri, 3 Aug 2018 07:24:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EBCB2C469 for ; Fri, 3 Aug 2018 07:24:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5314E2C5AE; Fri, 3 Aug 2018 07:24:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D22042C469 for ; Fri, 3 Aug 2018 07:24:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732712AbeHCJTk (ORCPT ); Fri, 3 Aug 2018 05:19:40 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57719 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732044AbeHCJQe (ORCPT ); Fri, 3 Aug 2018 05:16:34 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 09A33107081DE; Fri, 3 Aug 2018 15:25:04 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ggSJB_oDoFxx; Fri, 3 Aug 2018 15:25:03 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 220A7107081F8; Fri, 3 Aug 2018 15:25:03 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 220A7107081F8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281103; bh=Ow36zmdsQYZfWnD3zRukEJCZssrqFsof9z2X7IRzgbE=; h=From:To:Subject:Date:Message-Id; b=Z/3ficrOVbuMs0KcFpEu2lxDJ1ZyESta9v6MiT49YDHijVs8pxWXXQt04nyNxz3Ck XwcSXMqLE5Si75ZKWm0DkwDLbrHfpzzDPp0yp9bDzxav0YrljRbkLnO2GLYZB5fTHX Dp4EyrhhPNx0hnzh0XRd8ebY+duhV7r3d7zEqfM8= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id H_bEighWJhIa; Fri, 3 Aug 2018 15:25:03 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 308F1107081DB; Fri, 3 Aug 2018 15:25:02 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 15/46] dmaengine: s3c24xx-dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:45 +0800 Message-Id: <20180803072016.21544-16-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_slave_reg Signed-off-by: Huang Shijie --- drivers/dma/s3c24xx-dma.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/dma/s3c24xx-dma.c b/drivers/dma/s3c24xx-dma.c index 64744eb88720..1d820c0cd14b 100644 --- a/drivers/dma/s3c24xx-dma.c +++ b/drivers/dma/s3c24xx-dma.c @@ -1330,7 +1330,7 @@ static int s3c24xx_dma_probe(struct platform_device *pdev) goto err_slave; } - ret = dma_async_device_register(&s3cdma->memcpy); + ret = dmaenginem_async_device_register(&s3cdma->memcpy); if (ret) { dev_warn(&pdev->dev, "%s failed to register memcpy as an async device - %d\n", @@ -1338,12 +1338,12 @@ static int s3c24xx_dma_probe(struct platform_device *pdev) goto err_memcpy_reg; } - ret = dma_async_device_register(&s3cdma->slave); + ret = dmaenginem_async_device_register(&s3cdma->slave); if (ret) { dev_warn(&pdev->dev, "%s failed to register slave as an async device - %d\n", __func__, ret); - goto err_slave_reg; + goto err_memcpy_reg; } platform_set_drvdata(pdev, s3cdma); @@ -1352,8 +1352,6 @@ static int s3c24xx_dma_probe(struct platform_device *pdev) return 0; -err_slave_reg: - dma_async_device_unregister(&s3cdma->memcpy); err_memcpy_reg: s3c24xx_dma_free_virtual_channels(&s3cdma->slave); err_slave: @@ -1388,9 +1386,6 @@ static int s3c24xx_dma_remove(struct platform_device *pdev) struct soc_data *sdata = s3c24xx_dma_get_soc_data(pdev); int i; - dma_async_device_unregister(&s3cdma->slave); - dma_async_device_unregister(&s3cdma->memcpy); - s3c24xx_dma_free_irq(pdev, s3cdma); s3c24xx_dma_free_virtual_channels(&s3cdma->slave); From patchwork Fri Aug 3 07:19:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554721 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1CC9C157D for ; Fri, 3 Aug 2018 07:24:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 042AD2C469 for ; Fri, 3 Aug 2018 07:24:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBA102C5AE; Fri, 3 Aug 2018 07:24:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 944D12C469 for ; Fri, 3 Aug 2018 07:24:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732424AbeHCJQe (ORCPT ); Fri, 3 Aug 2018 05:16:34 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57735 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728037AbeHCJQe (ORCPT ); Fri, 3 Aug 2018 05:16:34 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 3F6F7107081E0; Fri, 3 Aug 2018 15:25:04 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id fVM2UXrjxfXz; Fri, 3 Aug 2018 15:25:04 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id D827D107081CD; Fri, 3 Aug 2018 15:25:03 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai D827D107081CD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281103; bh=BKayUkDt7LxUjs0513qVAfXIf3FnhRR8RnCrBKcr6a8=; h=From:To:Subject:Date:Message-Id; b=N+SaFlDiTrv7+l9+LmbjfU59PQaYKYt9jbGFoSuSKycP9kNQ6mIubruD1UDqa7Ddy bi3YkuxBKf+XhNnz42KWHGuOI/gEn6WkPY0T6Rnw8xwgsCUJuesyRQxjwCCqwIw1eB gA1+6C++8YY8QX9tCLPyd+4/PAVRrIzfXhuVzzMo= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id G304xBUbhKNA; Fri, 3 Aug 2018 15:25:03 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 1AF84107081F1; Fri, 3 Aug 2018 15:25:03 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 16/46] dmaengine: ste_dma40: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:46 +0800 Message-Id: <20180803072016.21544-17-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label unregister_slave, unregister_memcpy Signed-off-by: Huang Shijie --- drivers/dma/ste_dma40.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index f4edfc56f34e..5e328bd10c27 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -2839,7 +2839,7 @@ static int __init d40_dmaengine_init(struct d40_base *base, d40_ops_init(base, &base->dma_slave); - err = dma_async_device_register(&base->dma_slave); + err = dmaenginem_async_device_register(&base->dma_slave); if (err) { d40_err(base->dev, "Failed to register slave channels\n"); @@ -2854,12 +2854,12 @@ static int __init d40_dmaengine_init(struct d40_base *base, d40_ops_init(base, &base->dma_memcpy); - err = dma_async_device_register(&base->dma_memcpy); + err = dmaenginem_async_device_register(&base->dma_memcpy); if (err) { d40_err(base->dev, "Failed to register memcpy only channels\n"); - goto unregister_slave; + goto exit; } d40_chan_init(base, &base->dma_both, base->phy_chans, @@ -2871,18 +2871,14 @@ static int __init d40_dmaengine_init(struct d40_base *base, dma_cap_set(DMA_CYCLIC, base->dma_slave.cap_mask); d40_ops_init(base, &base->dma_both); - err = dma_async_device_register(&base->dma_both); + err = dmaenginem_async_device_register(&base->dma_both); if (err) { d40_err(base->dev, "Failed to register logical and physical capable channels\n"); - goto unregister_memcpy; + goto exit; } return 0; - unregister_memcpy: - dma_async_device_unregister(&base->dma_memcpy); - unregister_slave: - dma_async_device_unregister(&base->dma_slave); exit: return err; } From patchwork Fri Aug 3 07:19:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554717 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6EAA013BB for ; Fri, 3 Aug 2018 07:24:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5576D2C469 for ; Fri, 3 Aug 2018 07:24:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49B952C5AE; Fri, 3 Aug 2018 07:24:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFF802C469 for ; Fri, 3 Aug 2018 07:24:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732554AbeHCJQe (ORCPT ); Fri, 3 Aug 2018 05:16:34 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57209 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732189AbeHCJQe (ORCPT ); Fri, 3 Aug 2018 05:16:34 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 12ABF107081D4; Fri, 3 Aug 2018 15:25:05 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id wlplvU3QaoJ7; Fri, 3 Aug 2018 15:25:04 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id B0A21107081E5; Fri, 3 Aug 2018 15:25:04 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai B0A21107081E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281104; bh=kAT7hdz1/c/kUv3J+HigDrxi1unz0rwsArvtG4ZSK48=; h=From:To:Subject:Date:Message-Id; b=lU9bnVztzFC7McuKr+Iw4SwQHat+aanZfJenoNaUdibtR7eT8+BPKOgSOwc+oO9po PmVlE8IKVOtYpyaugQC/LcdJNfg7fmEAkWNX+/SEKJIe/483Tu66EK91jBD70M1ivN wnL9FaYTUvnpqrtz9M1bFgKr9GUSqpys0pWKtGBY= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BH673FF6TXwq; Fri, 3 Aug 2018 15:25:04 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id C780D107081D4; Fri, 3 Aug 2018 15:25:03 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 17/46] dmaengine: stm32-mdma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:47 +0800 Message-Id: <20180803072016.21544-18-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie Acked-by: Pierre-Yves MORDRET --- drivers/dma/stm32-mdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32-mdma.c index 06dd1725375e..390e4cae0e1a 100644 --- a/drivers/dma/stm32-mdma.c +++ b/drivers/dma/stm32-mdma.c @@ -1656,7 +1656,7 @@ static int stm32_mdma_probe(struct platform_device *pdev) return ret; } - ret = dma_async_device_register(dd); + ret = dmaenginem_async_device_register(dd); if (ret) return ret; @@ -1674,8 +1674,6 @@ static int stm32_mdma_probe(struct platform_device *pdev) return 0; err_unregister: - dma_async_device_unregister(dd); - return ret; } From patchwork Fri Aug 3 07:19:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554713 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 15F03157D for ; Fri, 3 Aug 2018 07:24:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF8532C469 for ; Fri, 3 Aug 2018 07:24:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E23192C5AE; Fri, 3 Aug 2018 07:24:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E9EB2C469 for ; Fri, 3 Aug 2018 07:24:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732579AbeHCJQk (ORCPT ); Fri, 3 Aug 2018 05:16:40 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57868 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732169AbeHCJQj (ORCPT ); Fri, 3 Aug 2018 05:16:39 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id C7B4513ED1C92; Fri, 3 Aug 2018 15:25:05 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id qTpQtEGuJd2q; Fri, 3 Aug 2018 15:25:05 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 23EBB107081E5; Fri, 3 Aug 2018 15:25:05 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 23EBB107081E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281105; bh=cOfVPjVsI1zKWEyZpKlaDFl0CrGVg016Dqj+Z2c7Ndo=; h=From:To:Subject:Date:Message-Id; b=JkaRiOHrT145djcLEACVUpVlppsHVvWPc64O8urE+125fI1LDRpgPd4qVeLgKjTka YChxPkRZ1kvQrCr9QPGuvgjyDb3hP875XAxHeoj82sta/heoiaHJtjwKDIwZTViFA3 eBRNxhBEgGhRPT8U8wzJirI16/oytYqyIdiKSbjQ= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nt5x-AZgwMOz; Fri, 3 Aug 2018 15:25:05 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 941CD107081E4; Fri, 3 Aug 2018 15:25:04 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 18/46] dmaengine: stm32-dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:48 +0800 Message-Id: <20180803072016.21544-19-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister Signed-off-by: Huang Shijie --- drivers/dma/stm32-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c index 379e8d534e61..6bbb3fab4f13 100644 --- a/drivers/dma/stm32-dma.c +++ b/drivers/dma/stm32-dma.c @@ -1295,7 +1295,7 @@ static int stm32_dma_probe(struct platform_device *pdev) vchan_init(&chan->vchan, dd); } - ret = dma_async_device_register(dd); + ret = dmaenginem_async_device_register(dd); if (ret) return ret; @@ -1334,7 +1334,6 @@ static int stm32_dma_probe(struct platform_device *pdev) return 0; err_unregister: - dma_async_device_unregister(dd); return ret; } From patchwork Fri Aug 3 07:19:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554723 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B52813BB for ; Fri, 3 Aug 2018 07:25:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 422942C469 for ; Fri, 3 Aug 2018 07:25:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35E142C5EC; Fri, 3 Aug 2018 07:25:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C47FB2C469 for ; Fri, 3 Aug 2018 07:24:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729611AbeHCJTt (ORCPT ); Fri, 3 Aug 2018 05:19:49 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:58124 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732459AbeHCJQe (ORCPT ); Fri, 3 Aug 2018 05:16:34 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 415A0145043E0; Fri, 3 Aug 2018 15:25:06 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id avnzggResGyn; Fri, 3 Aug 2018 15:25:06 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id D38CC140B5B36; Fri, 3 Aug 2018 15:25:05 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai D38CC140B5B36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281105; bh=vcDaDJOSDa3hN9eZg/GV29baml3jT4+orzxm4WstkYk=; h=From:To:Subject:Date:Message-Id; b=Ehjo6eMUKCCZ06GV4uFkLaAglPxfsqRoTr9vSVEuu4EXxnHLRmdAPef5KCr96v9o3 kTt99bkwu9jfsbmL+CtGUqZuwRb6zrQvTSKOtBUMhToYQW3PX5td1jmkA2Y63g5TfT 1fbGBMkMbXUF/Oo7K+sQGV87DnNdljAByVDuK/EA= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id owEe3doObIDK; Fri, 3 Aug 2018 15:25:05 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 167EA107081ED; Fri, 3 Aug 2018 15:25:05 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 19/46] dmaengine: sprd-dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:49 +0800 Message-Id: <20180803072016.21544-20-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_of_register Signed-off-by: Huang Shijie --- drivers/dma/sprd-dma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index 55df0d41355b..d06459d1f96f 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -943,7 +943,7 @@ static int sprd_dma_probe(struct platform_device *pdev) if (ret < 0) goto err_rpm; - ret = dma_async_device_register(&sdev->dma_dev); + ret = dmaenginem_async_device_register(&sdev->dma_dev); if (ret < 0) { dev_err(&pdev->dev, "register dma device failed:%d\n", ret); goto err_register; @@ -953,13 +953,11 @@ static int sprd_dma_probe(struct platform_device *pdev) ret = of_dma_controller_register(np, of_dma_simple_xlate, &sprd_dma_info); if (ret) - goto err_of_register; + goto err_register; pm_runtime_put(&pdev->dev); return 0; -err_of_register: - dma_async_device_unregister(&sdev->dma_dev); err_register: pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); @@ -989,7 +987,6 @@ static int sprd_dma_remove(struct platform_device *pdev) } of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&sdev->dma_dev); sprd_dma_disable(sdev); pm_runtime_put_noidle(&pdev->dev); From patchwork Fri Aug 3 07:19:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4929F157D for ; Fri, 3 Aug 2018 07:22:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30D82286B0 for ; Fri, 3 Aug 2018 07:22:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24EFB2C469; Fri, 3 Aug 2018 07:22:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8BE2286B0 for ; Fri, 3 Aug 2018 07:22:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732796AbeHCJQv (ORCPT ); Fri, 3 Aug 2018 05:16:51 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:59484 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729792AbeHCJQu (ORCPT ); Fri, 3 Aug 2018 05:16:50 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id D4E12145043E7; Fri, 3 Aug 2018 15:25:06 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id qbi4HePeErs1; Fri, 3 Aug 2018 15:25:06 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 83230145043E5; Fri, 3 Aug 2018 15:25:06 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 83230145043E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281106; bh=+0LEdI0tbpncqLolsx8+88+h1o2BYz5/RWpFQWPdgbQ=; h=From:To:Subject:Date:Message-Id; b=HcC2/AqoeB8Ev3PQmhVaekRq8vZM23ITh/7Jas7xLU2S1xwK9HRtrgmGqcGQIPg2k dbNGaigiU+uUXWf4eh6hakCqEHM0BbkELp6gH0X7hcOnyj6UT+ZGLzS5Vz+yDkt/Qh zZAl+p/ZLRJlzmkWlaZkxtpXs42HopmvQ7WUSenA= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Za_VUvQ5aMC0; Fri, 3 Aug 2018 15:25:06 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id A2667107081E4; Fri, 3 Aug 2018 15:25:05 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 20/46] dmaengine: sirf-dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:50 +0800 Message-Id: <20180803072016.21544-21-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label unreg_dma_dev Signed-off-by: Huang Shijie --- drivers/dma/sirf-dma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index a0733ac3edb1..de19880d4254 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c @@ -944,7 +944,7 @@ static int sirfsoc_dma_probe(struct platform_device *op) /* Register DMA engine */ dev_set_drvdata(dev, sdma); - ret = dma_async_device_register(dma); + ret = dmaenginem_async_device_register(dma); if (ret) goto free_irq; @@ -952,7 +952,7 @@ static int sirfsoc_dma_probe(struct platform_device *op) ret = of_dma_controller_register(dn, of_dma_sirfsoc_xlate, sdma); if (ret) { dev_err(dev, "failed to register DMA controller\n"); - goto unreg_dma_dev; + goto free_irq; } pm_runtime_enable(&op->dev); @@ -960,8 +960,6 @@ static int sirfsoc_dma_probe(struct platform_device *op) return 0; -unreg_dma_dev: - dma_async_device_unregister(dma); free_irq: free_irq(sdma->irq, sdma); irq_dispose: @@ -975,7 +973,6 @@ static int sirfsoc_dma_remove(struct platform_device *op) struct sirfsoc_dma *sdma = dev_get_drvdata(dev); of_dma_controller_free(op->dev.of_node); - dma_async_device_unregister(&sdma->dma); free_irq(sdma->irq, sdma); tasklet_kill(&sdma->tasklet); irq_dispose_mapping(sdma->irq); From patchwork Fri Aug 3 07:19:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554711 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 573EF157D for ; Fri, 3 Aug 2018 07:24:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C1432C469 for ; Fri, 3 Aug 2018 07:24:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DD862C5AE; Fri, 3 Aug 2018 07:24:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC8722C469 for ; Fri, 3 Aug 2018 07:24:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732169AbeHCJQk (ORCPT ); Fri, 3 Aug 2018 05:16:40 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:58141 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732327AbeHCJQj (ORCPT ); Fri, 3 Aug 2018 05:16:39 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 8F5D5145043EC; Fri, 3 Aug 2018 15:25:07 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id A588wdDxjdzk; Fri, 3 Aug 2018 15:25:07 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 3870B145043E6; Fri, 3 Aug 2018 15:25:07 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 3870B145043E6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281107; bh=w3cxYzdbbUkJtxOQKY/8TfWTnojmX4H6Gg3ntVMaPUY=; h=From:To:Subject:Date:Message-Id; b=X5zERYy2BRXYoa6cdNrzHOsr6UXiRHys9mmrKg/uxcioca0AaLvd+CqvZw88IFaGZ QDej070cvjWueguqxykxTqU0SXbq+OwfiRga9s9u5U4gkI1oL8zxDg6oNrUbS1WJ6l 4/6yYPdHy16jbxiRkcJ/m36fxMVG/xMbuZOgTEbk= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kKUaJ0llosoK; Fri, 3 Aug 2018 15:25:07 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 77824145043E2; Fri, 3 Aug 2018 15:25:06 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 21/46] dmaengine: bam_dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:51 +0800 Message-Id: <20180803072016.21544-22-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_unregister_dma Signed-off-by: Huang Shijie --- drivers/dma/qcom/bam_dma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index 1617715aa6e0..d164892a8aa4 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -1332,7 +1332,7 @@ static int bam_dma_probe(struct platform_device *pdev) bdev->common.device_tx_status = bam_tx_status; bdev->common.dev = bdev->dev; - ret = dma_async_device_register(&bdev->common); + ret = dmaenginem_async_device_register(&bdev->common); if (ret) { dev_err(bdev->dev, "failed to register dma async device\n"); goto err_bam_channel_exit; @@ -1341,7 +1341,7 @@ static int bam_dma_probe(struct platform_device *pdev) ret = of_dma_controller_register(pdev->dev.of_node, bam_dma_xlate, &bdev->common); if (ret) - goto err_unregister_dma; + goto err_bam_channel_exit; if (bdev->controlled_remotely) { pm_runtime_disable(&pdev->dev); @@ -1357,8 +1357,6 @@ static int bam_dma_probe(struct platform_device *pdev) return 0; -err_unregister_dma: - dma_async_device_unregister(&bdev->common); err_bam_channel_exit: for (i = 0; i < bdev->num_channels; i++) tasklet_kill(&bdev->channels[i].vc.task); @@ -1378,7 +1376,6 @@ static int bam_dma_remove(struct platform_device *pdev) pm_runtime_force_suspend(&pdev->dev); of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&bdev->common); /* mask all interrupts for this execution environment */ writel_relaxed(0, bam_addr(bdev, 0, BAM_IRQ_SRCS_MSK_EE)); From patchwork Fri Aug 3 07:19:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554725 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D2CE4157D for ; Fri, 3 Aug 2018 07:25:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B996F2C4A9 for ; Fri, 3 Aug 2018 07:25:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD6B92C5B7; Fri, 3 Aug 2018 07:25:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 581902C469 for ; Fri, 3 Aug 2018 07:25:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732519AbeHCJQd (ORCPT ); Fri, 3 Aug 2018 05:16:33 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:58139 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732424AbeHCJQd (ORCPT ); Fri, 3 Aug 2018 05:16:33 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 151D1145043ED; Fri, 3 Aug 2018 15:25:08 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id yhSkQc7kYrmS; Fri, 3 Aug 2018 15:25:07 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 8EAFA145043EA; Fri, 3 Aug 2018 15:25:07 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 8EAFA145043EA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281107; bh=ejI9XChtJpbB5/46gl8gx4n8gFnpPKkCC/37oVfT2DE=; h=From:To:Subject:Date:Message-Id; b=gMXiRZU6VryuZbZYblIIQtf/7KlXdZiJccGSsTw/JtkZ2DAm9mqabYMFayk2FLLcl UJ34GAGA65dTuYKvv3C4ivBwkg7ftDXOU78X0lCxPsGvZIcrmWu0/LHib1RNfw4zS/ o2TyfQbAN2hSx13Jqzpw7fRrtOyKyvs4+ck5e+yI= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Smf9vVHJK4BW; Fri, 3 Aug 2018 15:25:07 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 280E9145043E1; Fri, 3 Aug 2018 15:25:07 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 22/46] dmaengine: sudmac: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:52 +0800 Message-Id: <20180803072016.21544-23-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_slave_reg Signed-off-by: Huang Shijie --- drivers/dma/sh/sudmac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c index 69b9564dc9d9..f861067edef4 100644 --- a/drivers/dma/sh/sudmac.c +++ b/drivers/dma/sh/sudmac.c @@ -376,7 +376,7 @@ static int sudmac_probe(struct platform_device *pdev) goto chan_probe_err; } - err = dma_async_device_register(&su_dev->shdma_dev.dma_dev); + err = dmaenginem_async_device_register(&su_dev->shdma_dev.dma_dev); if (err < 0) goto chan_probe_err; @@ -393,9 +393,7 @@ static int sudmac_probe(struct platform_device *pdev) static int sudmac_remove(struct platform_device *pdev) { struct sudmac_device *su_dev = platform_get_drvdata(pdev); - struct dma_device *dma_dev = &su_dev->shdma_dev.dma_dev; - dma_async_device_unregister(dma_dev); sudmac_chan_remove(su_dev); shdma_cleanup(&su_dev->shdma_dev); From patchwork Fri Aug 3 07:19:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554731 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 55386157D for ; Fri, 3 Aug 2018 07:25:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D0BA28842 for ; Fri, 3 Aug 2018 07:25:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 304D02C5B7; Fri, 3 Aug 2018 07:25:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8FE128842 for ; Fri, 3 Aug 2018 07:25:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732425AbeHCJQ3 (ORCPT ); Fri, 3 Aug 2018 05:16:29 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57165 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729811AbeHCJQ2 (ORCPT ); Fri, 3 Aug 2018 05:16:28 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id B2AEE145043EE; Fri, 3 Aug 2018 15:25:09 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id U-52KWmOzNC2; Fri, 3 Aug 2018 15:25:08 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 758CC145043F2; Fri, 3 Aug 2018 15:25:08 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 758CC145043F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281108; bh=R2Yu2XUwLb8y9Ys11jzguBQX/2VSgq1uLgTtlHP65OY=; h=From:To:Subject:Date:Message-Id; b=Jt+jtPVINBy2CQXzF4bENqtOqvUvtWdfHRdLO0oHm/oFvnm0g/pakT5rwRrCEJKRt vV2qRi4/oV/Qy+FQBHGYlmjDBNqeAl1QnqfDIh/ggfymDGKB/6kc08oecYYs9v9Us9 FLdrbfqboH4sIcnKd0A8uycrScBtEuTCi8sT8PfI= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kwfUPpbiEdOA; Fri, 3 Aug 2018 15:25:08 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id BCA94145043EE; Fri, 3 Aug 2018 15:25:07 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 23/46] dmaengine: sa11x0-dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:53 +0800 Message-Id: <20180803072016.21544-24-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/sa11x0-dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c index b31d07c7d93c..9181d6048f43 100644 --- a/drivers/dma/sa11x0-dma.c +++ b/drivers/dma/sa11x0-dma.c @@ -863,7 +863,7 @@ static int sa11x0_dma_init_dmadev(struct dma_device *dmadev, vchan_init(&c->vc, dmadev); } - return dma_async_device_register(dmadev); + return dmaenginem_async_device_register(dmadev); } static int sa11x0_dma_request_irq(struct platform_device *pdev, int nr, @@ -987,8 +987,6 @@ static int sa11x0_dma_remove(struct platform_device *pdev) struct sa11x0_dma_dev *d = platform_get_drvdata(pdev); unsigned pch; - dma_async_device_unregister(&d->slave); - sa11x0_dma_free_channels(&d->slave); for (pch = 0; pch < NR_PHY_CHAN; pch++) sa11x0_dma_free_irq(pdev, pch, &d->phy[pch]); From patchwork Fri Aug 3 07:19:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554679 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5719E13BB for ; Fri, 3 Aug 2018 07:23:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EB46286B0 for ; Fri, 3 Aug 2018 07:23:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31BED2883A; Fri, 3 Aug 2018 07:23:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C63F2286B0 for ; Fri, 3 Aug 2018 07:23:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732705AbeHCJQq (ORCPT ); Fri, 3 Aug 2018 05:16:46 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:58213 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729792AbeHCJQp (ORCPT ); Fri, 3 Aug 2018 05:16:45 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id B3259145043FF; Fri, 3 Aug 2018 15:25:09 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ZihNdxV5xzk7; Fri, 3 Aug 2018 15:25:08 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id C8FE4145043F5; Fri, 3 Aug 2018 15:25:08 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai C8FE4145043F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281108; bh=MIDct06K7D3I+nNx9snOLVORGB+I4sXowbtdn7FRzIA=; h=From:To:Subject:Date:Message-Id; b=NDA6ue//yU8oQGHglIQILXocid84co2jfpNOq6v5Mxs+al8P+LnQamlkEe1QhxQmr z9FC+ClIMykJA02yGMqAQwft0hfAQtx0mzuN+gEby+K8aeGTV0Zm/jrWjqxbUoGfuz 2ZyPD0MyifvF4Vw3wAxzpiThSiwgk2oahI9Ln00c= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0Qbw3UhO52Md; Fri, 3 Aug 2018 15:25:08 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 64575145043E5; Fri, 3 Aug 2018 15:25:08 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 24/46] dmaengine: nbpfaxi: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:54 +0800 Message-Id: <20180803072016.21544-25-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label e_dma_dev_unreg Signed-off-by: Huang Shijie --- drivers/dma/nbpfaxi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c index 8c7b2e8703da..def82e77f321 100644 --- a/drivers/dma/nbpfaxi.c +++ b/drivers/dma/nbpfaxi.c @@ -1437,18 +1437,16 @@ static int nbpf_probe(struct platform_device *pdev) nbpf_configure(nbpf); - ret = dma_async_device_register(dma_dev); + ret = dmaenginem_async_device_register(dma_dev); if (ret < 0) goto e_clk_off; ret = of_dma_controller_register(np, nbpf_of_xlate, nbpf); if (ret < 0) - goto e_dma_dev_unreg; + goto e_clk_off; return 0; -e_dma_dev_unreg: - dma_async_device_unregister(dma_dev); e_clk_off: clk_disable_unprepare(nbpf->clk); @@ -1471,7 +1469,6 @@ static int nbpf_remove(struct platform_device *pdev) } of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&nbpf->dma_dev); clk_disable_unprepare(nbpf->clk); return 0; From patchwork Fri Aug 3 07:19:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D8DE13BB for ; Fri, 3 Aug 2018 07:21:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7BA7286B0 for ; Fri, 3 Aug 2018 07:21:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB2BB2C469; Fri, 3 Aug 2018 07:21:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8753D286B0 for ; Fri, 3 Aug 2018 07:21:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732463AbeHCJQa (ORCPT ); Fri, 3 Aug 2018 05:16:30 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57210 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732423AbeHCJQa (ORCPT ); Fri, 3 Aug 2018 05:16:30 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id CE5D214504401; Fri, 3 Aug 2018 15:25:09 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id iQr33wHCtCzo; Fri, 3 Aug 2018 15:25:09 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 678CA145043FE; Fri, 3 Aug 2018 15:25:09 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 678CA145043FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281109; bh=rgmSXGMvw+EYuLBa3ZU933snDykwSEnuCUtsDBz8ScQ=; h=From:To:Subject:Date:Message-Id; b=IkXXP2ayISbTq0EvcAKBELZ5qSfQd2vxMb/Qb/PZ7mYD4/G15q6+sK18KyYa0fua8 06CqgRgTezIhwX3uPky24BSHxK4kD8wlsuSrVXtaAPCia9WnkiItRCA3ChUCCuqeKt zSHZLVKr/9iBaI6qIHGfhrU1fqzdewfVMuM4Q3kY= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ccBozGSxrAxX; Fri, 3 Aug 2018 15:25:09 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id BF6C9145043EE; Fri, 3 Aug 2018 15:25:08 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 25/46] dmaengine: mmp_tdma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:55 +0800 Message-Id: <20180803072016.21544-26-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. return error if it fails. Signed-off-by: Huang Shijie --- drivers/dma/mmp_tdma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index 13c68b6434ce..9f5869e1a017 100644 --- a/drivers/dma/mmp_tdma.c +++ b/drivers/dma/mmp_tdma.c @@ -530,9 +530,6 @@ static void mmp_tdma_issue_pending(struct dma_chan *chan) static int mmp_tdma_remove(struct platform_device *pdev) { - struct mmp_tdma_device *tdev = platform_get_drvdata(pdev); - - dma_async_device_unregister(&tdev->device); return 0; } @@ -696,7 +693,7 @@ static int mmp_tdma_probe(struct platform_device *pdev) dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); platform_set_drvdata(pdev, tdev); - ret = dma_async_device_register(&tdev->device); + ret = dmaenginem_async_device_register(&tdev->device); if (ret) { dev_err(tdev->device.dev, "unable to register\n"); return ret; @@ -708,7 +705,7 @@ static int mmp_tdma_probe(struct platform_device *pdev) if (ret) { dev_err(tdev->device.dev, "failed to register controller\n"); - dma_async_device_unregister(&tdev->device); + return ret; } } From patchwork Fri Aug 3 07:19:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554655 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E24F1157D for ; Fri, 3 Aug 2018 07:21:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C96B9286B0 for ; Fri, 3 Aug 2018 07:21:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD8E52C469; Fri, 3 Aug 2018 07:21:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BEB9286B0 for ; Fri, 3 Aug 2018 07:21:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732738AbeHCJQs (ORCPT ); Fri, 3 Aug 2018 05:16:48 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:58241 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732649AbeHCJQr (ORCPT ); Fri, 3 Aug 2018 05:16:47 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id B26DF145043FD; Fri, 3 Aug 2018 15:25:11 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 05L9LKppd-4y; Fri, 3 Aug 2018 15:25:10 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 3C27A14504407; Fri, 3 Aug 2018 15:25:10 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 3C27A14504407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281110; bh=tCNaotTdSqbGTfT8OB8f2ujghYiT6G00YFSCojxCDi4=; h=From:To:Subject:Date:Message-Id; b=GzzM0broSo02Lyqc0ApOFE6mQ5Niltv+2xGDxHSI3cno3hp1KcCfPNkcPvMZb06Ad HvpPOAbo84ym1hiQOkIEQBbQEN9RFyzWTw9Vd9lUZo+SIXMncni7OH0e/kb1+4+4hT 8/BXV5nBkGC3HObjD1dFG3NbSNKYpi/rCI2qs6aQ= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BMiyBOIkuFOQ; Fri, 3 Aug 2018 15:25:10 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 4FC8A145043FD; Fri, 3 Aug 2018 15:25:09 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 26/46] dmaengine: shdmac: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:56 +0800 Message-Id: <20180803072016.21544-27-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/sh/shdmac.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c index 04a74e0a95b7..52060cd21e79 100644 --- a/drivers/dma/sh/shdmac.c +++ b/drivers/dma/sh/shdmac.c @@ -866,7 +866,7 @@ static int sh_dmae_probe(struct platform_device *pdev) pm_runtime_put(&pdev->dev); - err = dma_async_device_register(&shdev->shdma_dev.dma_dev); + err = dmaenginem_async_device_register(&shdev->shdma_dev.dma_dev); if (err < 0) goto edmadevreg; @@ -897,9 +897,6 @@ static int sh_dmae_probe(struct platform_device *pdev) static int sh_dmae_remove(struct platform_device *pdev) { struct sh_dmae_device *shdev = platform_get_drvdata(pdev); - struct dma_device *dma_dev = &shdev->shdma_dev.dma_dev; - - dma_async_device_unregister(dma_dev); spin_lock_irq(&sh_dmae_lock); list_del_rcu(&shdev->node); From patchwork Fri Aug 3 07:19:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554729 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7745713BB for ; Fri, 3 Aug 2018 07:25:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F39428842 for ; Fri, 3 Aug 2018 07:25:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 528FF2C5B7; Fri, 3 Aug 2018 07:25:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E79B928842 for ; Fri, 3 Aug 2018 07:25:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732483AbeHCJUG (ORCPT ); Fri, 3 Aug 2018 05:20:06 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57164 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732037AbeHCJQc (ORCPT ); Fri, 3 Aug 2018 05:16:32 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 34B28145043F6; Fri, 3 Aug 2018 15:25:12 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id cEm1KUxuKtZo; Fri, 3 Aug 2018 15:25:11 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id C64C2145043F3; Fri, 3 Aug 2018 15:25:11 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai C64C2145043F3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281111; bh=pte43Blx/ULsRNdZYeg/TR9QXeb2ZlzdXvZnohLoGWw=; h=From:To:Subject:Date:Message-Id; b=vOCoo3PWY1xVBRMBOkxuZg46Y5Vq6VK8LvEC137M7LQcUF0DjTDf5jcdJM9amO5Iz Gq8kWBTyv8Oshu/Ad+cmrFA9tF2SGMVKKxzGCRYNkscYEoUWZZFBZSGINzplEHdd3u xGlftQJkEilEJ6z76Hdo8MTTiNENfoqZL0DUTl78= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id h1zZD5SB2GLL; Fri, 3 Aug 2018 15:25:11 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id C99AE145043F5; Fri, 3 Aug 2018 15:25:10 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 27/46] dmaengine: usb-dmac: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:57 +0800 Message-Id: <20180803072016.21544-28-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/sh/usb-dmac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/sh/usb-dmac.c b/drivers/dma/sh/usb-dmac.c index 1bb1a8e09025..c09d7c65c2c5 100644 --- a/drivers/dma/sh/usb-dmac.c +++ b/drivers/dma/sh/usb-dmac.c @@ -849,7 +849,7 @@ static int usb_dmac_probe(struct platform_device *pdev) engine->device_tx_status = usb_dmac_tx_status; engine->device_issue_pending = usb_dmac_issue_pending; - ret = dma_async_device_register(engine); + ret = dmaenginem_async_device_register(engine); if (ret < 0) goto error; @@ -879,7 +879,6 @@ static int usb_dmac_remove(struct platform_device *pdev) for (i = 0; i < dmac->n_channels; ++i) usb_dmac_chan_remove(dmac, &dmac->channels[i]); of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&dmac->engine); pm_runtime_disable(&pdev->dev); From patchwork Fri Aug 3 07:19:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554659 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2CDC513BB for ; Fri, 3 Aug 2018 07:22:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14324286B0 for ; Fri, 3 Aug 2018 07:22:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07EEC2C4A9; Fri, 3 Aug 2018 07:22:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5DA3286B0 for ; Fri, 3 Aug 2018 07:22:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727101AbeHCJRH (ORCPT ); Fri, 3 Aug 2018 05:17:07 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57165 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729811AbeHCJRG (ORCPT ); Fri, 3 Aug 2018 05:17:06 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 599B8145043FC; Fri, 3 Aug 2018 15:25:14 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id wUCxEArsm497; Fri, 3 Aug 2018 15:25:14 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 341821450440A; Fri, 3 Aug 2018 15:25:13 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 341821450440A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281113; bh=stuiPk+EM5rfcEOSzYAbfgsCTKeVcQEhNThlrhnI+IY=; h=From:To:Subject:Date:Message-Id; b=bNITRQvTeLF5Uvx6A8NhZSpTcXSgWbFIhlZPSUyrb7KmkJ76qQlWAvJ6MfpYah25G Wc/CkB2a6xbbtlTd5OXqi3mCZiqVtlPevKqAOuEZnAKsmAUP2TTY+7kKE9O6AAhB77 f5/vFKv1mSZhdLvCqBk7MHltg1hauiZnG/gs+lA4= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id WlW0EUPU03vs; Fri, 3 Aug 2018 15:25:13 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id ADC33145043FC; Fri, 3 Aug 2018 15:25:11 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 28/46] dmaengine: rcar-dmac: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:58 +0800 Message-Id: <20180803072016.21544-29-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/sh/rcar-dmac.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 48ee35e2bce6..87130b3eef5c 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -1884,7 +1884,7 @@ static int rcar_dmac_probe(struct platform_device *pdev) * * Default transfer size of 32 bytes requires 32-byte alignment. */ - ret = dma_async_device_register(engine); + ret = dmaenginem_async_device_register(engine); if (ret < 0) goto error; @@ -1898,10 +1898,7 @@ static int rcar_dmac_probe(struct platform_device *pdev) static int rcar_dmac_remove(struct platform_device *pdev) { - struct rcar_dmac *dmac = platform_get_drvdata(pdev); - of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&dmac->engine); pm_runtime_disable(&pdev->dev); From patchwork Fri Aug 3 07:19:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554709 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0EE079093 for ; Fri, 3 Aug 2018 07:24:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA61C2C451 for ; Fri, 3 Aug 2018 07:24:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD66F2C5F7; Fri, 3 Aug 2018 07:24:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E3EF2C469 for ; Fri, 3 Aug 2018 07:24:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732638AbeHCJQn (ORCPT ); Fri, 3 Aug 2018 05:16:43 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57210 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732423AbeHCJQk (ORCPT ); Fri, 3 Aug 2018 05:16:40 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 76F26107081ED; Fri, 3 Aug 2018 15:25:15 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id pjuNEn1BXXDP; Fri, 3 Aug 2018 15:25:15 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id D46F41450441E; Fri, 3 Aug 2018 15:25:14 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai D46F41450441E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281114; bh=Sqfrl7Ojt0xjPSw4q5Us2rESf0dIPYLXdnwTkSqSbO4=; h=From:To:Subject:Date:Message-Id; b=WOjgy5gzBnUsjpw0kBSE1KOReW3/qvPhUgfzylkcSKn6LDCcsvK7OBjxh7v6Rv1ev pgaWHqRusQP9hS7dhBfkrz2aZ30cS4OhZhJT67V8t0i8mTIRg7mp5V1J8AitGNxUzW J9vsujvEaELayMVNJotibon5ICY9rrv13b//WU7s= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ta4LdwZ_2w59; Fri, 3 Aug 2018 15:25:14 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 5CFAA1450440C; Fri, 3 Aug 2018 15:25:13 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 29/46] dmaengine: hidma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:19:59 +0800 Message-Id: <20180803072016.21544-30-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/qcom/hidma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index 43d4b00b8138..1d8130edea58 100644 --- a/drivers/dma/qcom/hidma.c +++ b/drivers/dma/qcom/hidma.c @@ -877,7 +877,7 @@ static int hidma_probe(struct platform_device *pdev) if (rc) goto uninit; - rc = dma_async_device_register(&dmadev->ddev); + rc = dmaenginem_async_device_register(&dmadev->ddev); if (rc) goto uninit; @@ -924,7 +924,6 @@ static int hidma_remove(struct platform_device *pdev) struct hidma_dev *dmadev = platform_get_drvdata(pdev); pm_runtime_get_sync(dmadev->ddev.dev); - dma_async_device_unregister(&dmadev->ddev); if (!dmadev->lldev->msi_support) devm_free_irq(dmadev->ddev.dev, dmadev->irq, dmadev->lldev); else From patchwork Fri Aug 3 07:20:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554683 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90E7113BB for ; Fri, 3 Aug 2018 07:23:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7897A2882C for ; Fri, 3 Aug 2018 07:23:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A65128856; Fri, 3 Aug 2018 07:23:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06FB028826 for ; Fri, 3 Aug 2018 07:23:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732690AbeHCJQq (ORCPT ); Fri, 3 Aug 2018 05:16:46 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:58562 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732423AbeHCJQp (ORCPT ); Fri, 3 Aug 2018 05:16:45 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 295AE1450440A; Fri, 3 Aug 2018 15:25:16 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Bfu6Ffp2WxfK; Fri, 3 Aug 2018 15:25:15 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id CF7BE14504414; Fri, 3 Aug 2018 15:25:15 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai CF7BE14504414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281115; bh=HliJq+/uUFwV1AE8KSSlvTLy4bv3cU7FKfsNTt8PeI4=; h=From:To:Subject:Date:Message-Id; b=QQHQVUWw2piJQrcd/JWSqCw6qqXFLues7nrUTdY+J0Du7eCQGUoWJDZC3z6s5qBEH hVuqA+0fYcSOIq2OU+0DWqUMWPmaKuNuXTSPdVB9bnbYWPQ8vtukGm8k3ItMTcW2MJ JpfcTrWD8dTMW+ozRYwKi9F6tNW0JqkhY1kM1br0= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nwlm95gPp_BG; Fri, 3 Aug 2018 15:25:15 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id A78FC1450440A; Fri, 3 Aug 2018 15:25:14 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 30/46] dmaengine: pxa_dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:00 +0800 Message-Id: <20180803072016.21544-31-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/pxa_dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c index b31c28b67ad3..21001ea078fb 100644 --- a/drivers/dma/pxa_dma.c +++ b/drivers/dma/pxa_dma.c @@ -1285,7 +1285,6 @@ static int pxad_remove(struct platform_device *op) pxad_cleanup_debugfs(pdev); pxad_free_channels(&pdev->slave); - dma_async_device_unregister(&pdev->slave); return 0; } @@ -1396,7 +1395,7 @@ static int pxad_init_dmadev(struct platform_device *op, init_waitqueue_head(&c->wq_state); } - return dma_async_device_register(&pdev->slave); + return dmaenginem_async_device_register(&pdev->slave); } static int pxad_probe(struct platform_device *op) From patchwork Fri Aug 3 07:20:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554715 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3701F13BB for ; Fri, 3 Aug 2018 07:24:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E8BB2C469 for ; Fri, 3 Aug 2018 07:24:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 114312C5AE; Fri, 3 Aug 2018 07:24:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1C992C469 for ; Fri, 3 Aug 2018 07:24:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732743AbeHCJTd (ORCPT ); Fri, 3 Aug 2018 05:19:33 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57627 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732576AbeHCJQk (ORCPT ); Fri, 3 Aug 2018 05:16:40 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id D0369107081F0; Fri, 3 Aug 2018 15:25:18 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id SfCSmav23mhm; Fri, 3 Aug 2018 15:25:18 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 40E091450440D; Fri, 3 Aug 2018 15:25:17 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 40E091450440D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281117; bh=mxbkTipqAX2GlVy4BQFdzxVEf7gVOcJdK1nV6gJ/jBc=; h=From:To:Subject:Date:Message-Id; b=RLjqsI1+j68k0wF86fYPfYZAYmec10pBIixjNwAilWf2/XD9nNAQX9UiCmMZXzYxN OTus1lOZpSOHGojivKA9SrlrP9UcCax3Cj7RKf8MXl1fhYV+sL2fOCYWIL6zzI2sKc 27Rqs+FziKMQcsu1P1NuytQAQwEQtowruKj46mN4= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 1gvrlceLYi7h; Fri, 3 Aug 2018 15:25:16 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id ADCF7107081F1; Fri, 3 Aug 2018 15:25:15 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 31/46] dmaengine: moxart-dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:01 +0800 Message-Id: <20180803072016.21544-32-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/moxart-dma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/dma/moxart-dma.c b/drivers/dma/moxart-dma.c index e04499c1f27f..80bff27c5f9b 100644 --- a/drivers/dma/moxart-dma.c +++ b/drivers/dma/moxart-dma.c @@ -618,7 +618,7 @@ static int moxart_probe(struct platform_device *pdev) } mdc->irq = irq; - ret = dma_async_device_register(&mdc->dma_slave); + ret = dmaenginem_async_device_register(&mdc->dma_slave); if (ret) { dev_err(dev, "dma_async_device_register failed\n"); return ret; @@ -627,7 +627,6 @@ static int moxart_probe(struct platform_device *pdev) ret = of_dma_controller_register(node, moxart_of_xlate, mdc); if (ret) { dev_err(dev, "of_dma_controller_register failed\n"); - dma_async_device_unregister(&mdc->dma_slave); return ret; } @@ -642,8 +641,6 @@ static int moxart_remove(struct platform_device *pdev) devm_free_irq(&pdev->dev, m->irq, m); - dma_async_device_unregister(&m->dma_slave); - if (pdev->dev.of_node) of_dma_controller_free(pdev->dev.of_node); From patchwork Fri Aug 3 07:20:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6AC51157D for ; Fri, 3 Aug 2018 07:23:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51886286B0 for ; Fri, 3 Aug 2018 07:23:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4530A28856; Fri, 3 Aug 2018 07:23:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E88A128826 for ; Fri, 3 Aug 2018 07:23:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732578AbeHCJQq (ORCPT ); Fri, 3 Aug 2018 05:16:46 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57164 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732620AbeHCJQp (ORCPT ); Fri, 3 Aug 2018 05:16:45 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 2A56C1450441C; Fri, 3 Aug 2018 15:25:19 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id OFR43FS-YQg2; Fri, 3 Aug 2018 15:25:18 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id B3B1C1450441A; Fri, 3 Aug 2018 15:25:18 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai B3B1C1450441A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281118; bh=sYlwJ5RiWGaXSyuQbIFZWdtOrzK7EPZqNPhlQmJhOkg=; h=From:To:Subject:Date:Message-Id; b=MbYBU8UHwufVusFdJv2Ix1/hKvWQhk8iyPw8FiWF82RxQTX2+SclbA4dHq5YlyVsX xpT5biHkG7eP9RXrhssUSSOZEayo9FdVVGfDLhBqR0ZZY319u9+MK4AXaVutljCuuR 1vUdY7k+YMsORwzQ1kOPqH1ELu5Gkx8rCsmf7nAc= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3aFBHEXK6QuG; Fri, 3 Aug 2018 15:25:18 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id E395014504413; Fri, 3 Aug 2018 15:25:16 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 32/46] dmaengine: pl330: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:02 +0800 Message-Id: <20180803072016.21544-33-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/pl330.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 88750a34e859..e4bc330132c7 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -3037,7 +3037,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) pd->max_burst = ((pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP) ? 1 : PL330_MAX_BURST); - ret = dma_async_device_register(pd); + ret = dmaenginem_async_device_register(pd); if (ret) { dev_err(&adev->dev, "unable to register DMAC\n"); goto probe_err3; @@ -3114,8 +3114,6 @@ static int pl330_remove(struct amba_device *adev) devm_free_irq(&adev->dev, irq, pl330); } - dma_async_device_unregister(&pl330->ddma); - /* Idle the DMAC */ list_for_each_entry_safe(pch, _p, &pl330->ddma.channels, chan.device_node) { From patchwork Fri Aug 3 07:20:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554691 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7158013BB for ; Fri, 3 Aug 2018 07:23:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 580EE2C469 for ; Fri, 3 Aug 2018 07:23:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C2792C5AE; Fri, 3 Aug 2018 07:23:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3F042C469 for ; Fri, 3 Aug 2018 07:23:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731966AbeHCJSS (ORCPT ); Fri, 3 Aug 2018 05:18:18 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57209 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732189AbeHCJQq (ORCPT ); Fri, 3 Aug 2018 05:16:46 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 437E714504417; Fri, 3 Aug 2018 15:25:20 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 4IzbfSzBoPLT; Fri, 3 Aug 2018 15:25:20 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id E5FC814504402; Fri, 3 Aug 2018 15:25:19 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai E5FC814504402 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281119; bh=nqlPz7JrYaKKmhBz9zE4hhMU07s7gR6n7SR3LwpBZ0o=; h=From:To:Subject:Date:Message-Id; b=XDMyc/SyXPIYN9g4m+sZUzBbsHQNVH3ZlkTcOV90wCZxtS3Srk+qGB+IIu/qol5GA 2DkB9Ajb0aYHAOOOO1HuV1kLdJCQ60bJl6ZSEbH8VhPivfj/5EtXfKvCQTpELZ80i0 PPrZBAtQUWWJmokisBuXbvnAElMF1Ar7YU6SdiTs= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ENSTlBKo1pFK; Fri, 3 Aug 2018 15:25:19 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id DDE87107081F1; Fri, 3 Aug 2018 15:25:18 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 33/46] dmaengine: pch_dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:03 +0800 Message-Id: <20180803072016.21544-34-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/pch_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index afd8f27bda96..505463d077c0 100644 --- a/drivers/dma/pch_dma.c +++ b/drivers/dma/pch_dma.c @@ -922,7 +922,7 @@ static int pch_dma_probe(struct pci_dev *pdev, pd->dma.device_prep_slave_sg = pd_prep_slave_sg; pd->dma.device_terminate_all = pd_device_terminate_all; - err = dma_async_device_register(&pd->dma); + err = dmaenginem_async_device_register(&pd->dma); if (err) { dev_err(&pdev->dev, "Failed to register DMA device\n"); goto err_free_pool; @@ -952,8 +952,6 @@ static void pch_dma_remove(struct pci_dev *pdev) struct dma_chan *chan, *_c; if (pd) { - dma_async_device_unregister(&pd->dma); - free_irq(pdev->irq, pd); list_for_each_entry_safe(chan, _c, &pd->dma.channels, From patchwork Fri Aug 3 07:20:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554707 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E851913BB for ; Fri, 3 Aug 2018 07:24:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC5812C5AE for ; Fri, 3 Aug 2018 07:24:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEC802C5B7; Fri, 3 Aug 2018 07:24:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BDD92C451 for ; Fri, 3 Aug 2018 07:24:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732517AbeHCJTM (ORCPT ); Fri, 3 Aug 2018 05:19:12 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:58124 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732577AbeHCJQn (ORCPT ); Fri, 3 Aug 2018 05:16:43 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 1E75D107081F1; Fri, 3 Aug 2018 15:25:21 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ghKzrPCB-CCP; Fri, 3 Aug 2018 15:25:20 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id B53081450441E; Fri, 3 Aug 2018 15:25:20 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai B53081450441E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281120; bh=6DUAqC07vgSPkTJNSayDpKnDKQ1Qg/2ETN5hYoci42s=; h=From:To:Subject:Date:Message-Id; b=EO1aJzBusGjoEbDai/3zY3GjLHT4hdkgJfuBSGsg0EpHAJx/Kfgb9aFUbb0pocO05 lmHrb2E73SixMHLISjUmTBHMULYOzLUobLanf+3HEMuY8z/efpht3Z0aOeblNmOcq5 jmf3Wy+rVHrjmpZq5bf6218iKnyeSAbXo0Aemzag= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9m3sIUjFrKEy; Fri, 3 Aug 2018 15:25:20 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 010371450440F; Fri, 3 Aug 2018 15:25:19 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 34/46] dmaengine: mxs-dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:04 +0800 Message-Id: <20180803072016.21544-35-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/mxs-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index ae5182ff0128..35193b31a9e0 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -847,7 +847,7 @@ static int __init mxs_dma_probe(struct platform_device *pdev) mxs_dma->dma_device.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; mxs_dma->dma_device.device_issue_pending = mxs_dma_enable_chan; - ret = dma_async_device_register(&mxs_dma->dma_device); + ret = dmaenginem_async_device_register(&mxs_dma->dma_device); if (ret) { dev_err(mxs_dma->dma_device.dev, "unable to register\n"); return ret; @@ -857,7 +857,6 @@ static int __init mxs_dma_probe(struct platform_device *pdev) if (ret) { dev_err(mxs_dma->dma_device.dev, "failed to register controller\n"); - dma_async_device_unregister(&mxs_dma->dma_device); } dev_info(mxs_dma->dma_device.dev, "initialized\n"); From patchwork Fri Aug 3 07:20:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7FD38157D for ; Fri, 3 Aug 2018 07:21:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6627E286B0 for ; Fri, 3 Aug 2018 07:21:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59B462C5B7; Fri, 3 Aug 2018 07:21:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 072362C451 for ; Fri, 3 Aug 2018 07:21:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732616AbeHCJQn (ORCPT ); Fri, 3 Aug 2018 05:16:43 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57735 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732578AbeHCJQk (ORCPT ); Fri, 3 Aug 2018 05:16:40 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 6290C1450440F; Fri, 3 Aug 2018 15:25:22 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id tjS73QsVDCqm; Fri, 3 Aug 2018 15:25:21 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id BFB82107081FA; Fri, 3 Aug 2018 15:25:21 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai BFB82107081FA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281121; bh=ncGrydPtnf/aSQhFluURaqoFDfr7SHrg7yjX2icP44M=; h=From:To:Subject:Date:Message-Id; b=EZwqH9o+2D1qZXEdFyb+WKDyNNhP5IOzFrOJy9YGY/5SPn5UQ9hfgwLcy5ht41lXX zupY+gQoqeXu2CIJMSue9AzYTrmfkBKIZvtbA5M1O+SycaXvRumuOoIWDQG7gXGMfi 52FUgHlflYZpWE9k5ipFr3SpF68lrMOQsueANp2g= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id eqBmntOVgyws; Fri, 3 Aug 2018 15:25:21 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 990E414504402; Fri, 3 Aug 2018 15:25:20 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 35/46] dmaengine: mtk-hsdma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:05 +0800 Message-Id: <20180803072016.21544-36-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/mediatek/mtk-hsdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/mediatek/mtk-hsdma.c b/drivers/dma/mediatek/mtk-hsdma.c index b7ec56ae02a6..a8b2e84e1556 100644 --- a/drivers/dma/mediatek/mtk-hsdma.c +++ b/drivers/dma/mediatek/mtk-hsdma.c @@ -977,7 +977,7 @@ static int mtk_hsdma_probe(struct platform_device *pdev) INIT_LIST_HEAD(&vc->desc_hw_processing); } - err = dma_async_device_register(dd); + err = dmaenginem_async_device_register(dd); if (err) return err; @@ -1007,7 +1007,6 @@ static int mtk_hsdma_probe(struct platform_device *pdev) return 0; err_unregister: - dma_async_device_unregister(dd); return err; } @@ -1035,7 +1034,6 @@ static int mtk_hsdma_remove(struct platform_device *pdev) /* Disable hardware */ mtk_hsdma_hw_deinit(hsdma); - dma_async_device_unregister(&hsdma->ddev); of_dma_controller_free(pdev->dev.of_node); return 0; From patchwork Fri Aug 3 07:20:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B322A157D for ; Fri, 3 Aug 2018 07:22:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AC6D286B0 for ; Fri, 3 Aug 2018 07:22:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E93F2882C; Fri, 3 Aug 2018 07:22:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C107286B0 for ; Fri, 3 Aug 2018 07:22:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732571AbeHCJRy (ORCPT ); Fri, 3 Aug 2018 05:17:54 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:59014 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732327AbeHCJQq (ORCPT ); Fri, 3 Aug 2018 05:16:46 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 09DEE107081FD; Fri, 3 Aug 2018 15:25:23 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id PH5eJj_AmsQP; Fri, 3 Aug 2018 15:25:22 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id B45EF14504410; Fri, 3 Aug 2018 15:25:22 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai B45EF14504410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281122; bh=yokq+J9xdJRpn6yDKc3HUxfNPmMCa2VnExcS/vsCY7w=; h=From:To:Subject:Date:Message-Id; b=bn3pxKbldtgzgkrxXbM6+T5eCBQxBgyBD2QWTFbHX2g87c3jSbQ9fFqu7tBuDhtC5 IAA35li/zyfaFMs5k23G4SAKbeen7wdHD5W1HfzbpGGMMQ3OjW4Rde0pWPInRwxnWS YfJ3myi1YhuN5ecdB3LAhK8eyL9OZSYXJZGC8h0o= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id I1eoUGLO-tVd; Fri, 3 Aug 2018 15:25:22 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id B311F107081F7; Fri, 3 Aug 2018 15:25:21 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 36/46] dmaengine: k3dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:06 +0800 Message-Id: <20180803072016.21544-37-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label of_dma_register_fail Signed-off-by: Huang Shijie --- drivers/dma/k3dma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index 6bfa217ed6d0..5d9ab35b982d 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -902,14 +902,14 @@ static int k3_dma_probe(struct platform_device *op) k3_dma_enable_dma(d, true); - ret = dma_async_device_register(&d->slave); + ret = dmaenginem_async_device_register(&d->slave); if (ret) goto dma_async_register_fail; ret = of_dma_controller_register((&op->dev)->of_node, k3_of_dma_simple_xlate, d); if (ret) - goto of_dma_register_fail; + goto dma_async_register_fail; spin_lock_init(&d->lock); INIT_LIST_HEAD(&d->chan_pending); @@ -919,8 +919,6 @@ static int k3_dma_probe(struct platform_device *op) return 0; -of_dma_register_fail: - dma_async_device_unregister(&d->slave); dma_async_register_fail: clk_disable_unprepare(d->clk); return ret; @@ -931,7 +929,6 @@ static int k3_dma_remove(struct platform_device *op) struct k3_dma_chan *c, *cn; struct k3_dma_dev *d = platform_get_drvdata(op); - dma_async_device_unregister(&d->slave); of_dma_controller_free((&op->dev)->of_node); devm_free_irq(&op->dev, d->irq, d); From patchwork Fri Aug 3 07:20:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1E94713BB for ; Fri, 3 Aug 2018 07:24:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 055B82C451 for ; Fri, 3 Aug 2018 07:24:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBE282C5AE; Fri, 3 Aug 2018 07:24:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 971A52C451 for ; Fri, 3 Aug 2018 07:24:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732805AbeHCJTC (ORCPT ); Fri, 3 Aug 2018 05:19:02 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:59071 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732617AbeHCJQn (ORCPT ); Fri, 3 Aug 2018 05:16:43 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id C5331107081FF; Fri, 3 Aug 2018 15:25:23 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 6Jmc3i1VDrHN; Fri, 3 Aug 2018 15:25:23 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 44939107081FE; Fri, 3 Aug 2018 15:25:23 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 44939107081FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281123; bh=TBaKrpfhbftcvr/p6WFhOBVBJ1IwI0NZpO0Qr7fxBzI=; h=From:To:Subject:Date:Message-Id; b=vG/XcPhbyJBswCkMboq9r7H10IZVMpgvSqSx6PhUWMsHXR1HYZQ+wYWFaRkgZkXe6 dsPxsWIedqwI5Ln/WS6ajd20jZUwNDe5EBkf6Qj5wchSE2uuusps7aa+eVeeqta79Y irloDcMQ/9cHTWD+PtN1X91pM9og1362rWGXnyPM= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Pd3CL0Ucq_3U; Fri, 3 Aug 2018 15:25:23 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 9E088107081FA; Fri, 3 Aug 2018 15:25:22 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 37/46] dmaengine: imx-sdma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:07 +0800 Message-Id: <20180803072016.21544-38-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_register Signed-off-by: Huang Shijie --- drivers/dma/imx-sdma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index b4ec2d20e661..3ee28d044e3c 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -2062,7 +2062,7 @@ static int sdma_probe(struct platform_device *pdev) platform_set_drvdata(pdev, sdma); - ret = dma_async_device_register(&sdma->dma_device); + ret = dmaenginem_async_device_register(&sdma->dma_device); if (ret) { dev_err(&pdev->dev, "unable to register\n"); goto err_init; @@ -2072,7 +2072,7 @@ static int sdma_probe(struct platform_device *pdev) ret = of_dma_controller_register(np, sdma_xlate, sdma); if (ret) { dev_err(&pdev->dev, "failed to register controller\n"); - goto err_register; + goto err_init; } spba_bus = of_find_compatible_node(NULL, NULL, "fsl,spba-bus"); @@ -2086,8 +2086,6 @@ static int sdma_probe(struct platform_device *pdev) return 0; -err_register: - dma_async_device_unregister(&sdma->dma_device); err_init: kfree(sdma->script_addrs); err_irq: @@ -2103,7 +2101,6 @@ static int sdma_remove(struct platform_device *pdev) int i; devm_free_irq(&pdev->dev, sdma->irq, sdma); - dma_async_device_unregister(&sdma->dma_device); kfree(sdma->script_addrs); clk_unprepare(sdma->clk_ahb); clk_unprepare(sdma->clk_ipg); From patchwork Fri Aug 3 07:20:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 00910157D for ; Fri, 3 Aug 2018 07:24:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC8B82C451 for ; Fri, 3 Aug 2018 07:24:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D086F2C5AE; Fri, 3 Aug 2018 07:24:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C9F82C451 for ; Fri, 3 Aug 2018 07:24:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727594AbeHCJSy (ORCPT ); Fri, 3 Aug 2018 05:18:54 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:59111 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732619AbeHCJQn (ORCPT ); Fri, 3 Aug 2018 05:16:43 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 2CEC913AA51D9; Fri, 3 Aug 2018 15:25:24 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id D43tu2zrBXen; Fri, 3 Aug 2018 15:25:23 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id CF17C13AA51BE; Fri, 3 Aug 2018 15:25:23 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai CF17C13AA51BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281123; bh=wZ4aIDfQUJQq6YXYiT6w+/GpQddHamxLl2znTJrPDQw=; h=From:To:Subject:Date:Message-Id; b=ZG+X1DdT3gj7aEiaJvffyutgr2l+/xkisC0l9sP2S496Vv6b1xviQNahcPPXM61H0 2W/7zV+aquf7KFe21lEF1Cw/JdCeiq2fB4xn+f9IVPdXxibNwZ6AONbKKXMPCmAgcr ReBIIwopt75xULzDmjDJRg7/AOQ+3KqtAPCndeSg= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 1hZ_Cwc3E6Os; Fri, 3 Aug 2018 15:25:23 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 37FAE107081FC; Fri, 3 Aug 2018 15:25:23 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 38/46] dmaengine: imx-dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:08 +0800 Message-Id: <20180803072016.21544-39-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_of_dma_controller Signed-off-by: Huang Shijie --- drivers/dma/imx-dma.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index 75b6ff0415ee..d651fbea77ee 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -1186,7 +1186,7 @@ static int __init imxdma_probe(struct platform_device *pdev) imxdma->dma_device.dev->dma_parms = &imxdma->dma_parms; dma_set_max_seg_size(imxdma->dma_device.dev, 0xffffff); - ret = dma_async_device_register(&imxdma->dma_device); + ret = dmaenginem_async_device_register(&imxdma->dma_device); if (ret) { dev_err(&pdev->dev, "unable to register\n"); goto disable_dma_ahb_clk; @@ -1197,14 +1197,12 @@ static int __init imxdma_probe(struct platform_device *pdev) imxdma_xlate, imxdma); if (ret) { dev_err(&pdev->dev, "unable to register of_dma_controller\n"); - goto err_of_dma_controller; + goto disable_dma_ahb_clk; } } return 0; -err_of_dma_controller: - dma_async_device_unregister(&imxdma->dma_device); disable_dma_ahb_clk: clk_disable_unprepare(imxdma->dma_ahb); disable_dma_ipg_clk: @@ -1237,8 +1235,6 @@ static int imxdma_remove(struct platform_device *pdev) imxdma_free_irq(pdev, imxdma); - dma_async_device_unregister(&imxdma->dma_device); - if (pdev->dev.of_node) of_dma_controller_free(pdev->dev.of_node); From patchwork Fri Aug 3 07:20:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6219D13BB for ; Fri, 3 Aug 2018 07:21:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45928286B0 for ; Fri, 3 Aug 2018 07:21:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3935F2C5B7; Fri, 3 Aug 2018 07:21:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA27E286B0 for ; Fri, 3 Aug 2018 07:21:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732621AbeHCJQn (ORCPT ); Fri, 3 Aug 2018 05:16:43 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57868 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732616AbeHCJQn (ORCPT ); Fri, 3 Aug 2018 05:16:43 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id C78B6107081FC; Fri, 3 Aug 2018 15:25:24 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id zvIXhIildtni; Fri, 3 Aug 2018 15:25:24 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 6D0E113C8D166; Fri, 3 Aug 2018 15:25:24 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 6D0E113C8D166 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281124; bh=1BNkp2l6cXzeFs5h98vV4AlVKEZMTiTUjieZBVXoUWE=; h=From:To:Subject:Date:Message-Id; b=FXqzgB3GEGW+DKROzNoLwW8yaDGj6/kTktKd/6rW+0fUgNu4+qGYR4RPb/HH65a5V 7EcL2TbX3pJWXnHflz3R9gKDiSmJttMnmWItLmRftvQKPisH2Zz37FWtTHGOWZfwyL v/2IYzpRAow2y0TqUStxum03Y/ZSmS4+jwyGjhFc= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CFP3JaMPXKQ9; Fri, 3 Aug 2018 15:25:24 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id C31DA107081FA; Fri, 3 Aug 2018 15:25:23 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 39/46] dmaengine: img-mdc-dma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:09 +0800 Message-Id: <20180803072016.21544-40-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister remove label unregister Signed-off-by: Huang Shijie --- drivers/dma/img-mdc-dma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/img-mdc-dma.c b/drivers/dma/img-mdc-dma.c index 25cec9c243e1..1e555ac62b1e 100644 --- a/drivers/dma/img-mdc-dma.c +++ b/drivers/dma/img-mdc-dma.c @@ -1001,21 +1001,19 @@ static int mdc_dma_probe(struct platform_device *pdev) return ret; } - ret = dma_async_device_register(&mdma->dma_dev); + ret = dmaenginem_async_device_register(&mdma->dma_dev); if (ret) goto suspend; ret = of_dma_controller_register(pdev->dev.of_node, mdc_of_xlate, mdma); if (ret) - goto unregister; + goto suspend; dev_info(&pdev->dev, "MDC with %u channels and %u threads\n", mdma->nr_channels, mdma->nr_threads); return 0; -unregister: - dma_async_device_unregister(&mdma->dma_dev); suspend: if (!pm_runtime_enabled(&pdev->dev)) img_mdc_runtime_suspend(&pdev->dev); @@ -1029,7 +1027,6 @@ static int mdc_dma_remove(struct platform_device *pdev) struct mdc_chan *mchan, *next; of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&mdma->dma_dev); list_for_each_entry_safe(mchan, next, &mdma->dma_dev.channels, vc.chan.device_node) { From patchwork Fri Aug 3 07:20:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554687 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6688CA637 for ; Fri, 3 Aug 2018 07:23:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E9B2286B0 for ; Fri, 3 Aug 2018 07:23:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42C042882C; Fri, 3 Aug 2018 07:23:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA32B286B0 for ; Fri, 3 Aug 2018 07:23:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732423AbeHCJQq (ORCPT ); Fri, 3 Aug 2018 05:16:46 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:59304 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732578AbeHCJQp (ORCPT ); Fri, 3 Aug 2018 05:16:45 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 176EE14556868; Fri, 3 Aug 2018 15:25:27 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Z2BftHRRyNyL; Fri, 3 Aug 2018 15:25:26 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 7F7C614556865; Fri, 3 Aug 2018 15:25:26 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 7F7C614556865 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281126; bh=gRFOnUg805YoPlmlwGSAHvU6J1kX5Vd5rugJZ5+KGvM=; h=From:To:Subject:Date:Message-Id; b=BcZobnstU4T8XJnMqVul7rNxMybDfPGssMVMUdj2a51DJffTOgi9rGcZfHiCCplVn 1GAV4xvS+FVFtQgXe8CysyxKcKuiZrVHw4HmYCRUvH0jRBotO+w/rx69z5G3/d1HyM rjtawHi7LsdO6iuoKlfAaSIPyBffdVT/x5b937hY= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sMUF25L9K6tQ; Fri, 3 Aug 2018 15:25:26 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 95F51107081FA; Fri, 3 Aug 2018 15:25:24 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 40/46] dmaengine: fsl-edma: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:10 +0800 Message-Id: <20180803072016.21544-41-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/fsl-edma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/fsl-edma.c b/drivers/dma/fsl-edma.c index c7568869284e..f475efce1d60 100644 --- a/drivers/dma/fsl-edma.c +++ b/drivers/dma/fsl-edma.c @@ -972,7 +972,7 @@ static int fsl_edma_probe(struct platform_device *pdev) platform_set_drvdata(pdev, fsl_edma); - ret = dma_async_device_register(&fsl_edma->dma_dev); + ret = dmaenginem_async_device_register(&fsl_edma->dma_dev); if (ret) { dev_err(&pdev->dev, "Can't register Freescale eDMA engine. (%d)\n", ret); @@ -984,7 +984,6 @@ static int fsl_edma_probe(struct platform_device *pdev) if (ret) { dev_err(&pdev->dev, "Can't register Freescale eDMA of_dma. (%d)\n", ret); - dma_async_device_unregister(&fsl_edma->dma_dev); fsl_disable_clocks(fsl_edma, DMAMUX_NR); return ret; } @@ -1014,7 +1013,6 @@ static int fsl_edma_remove(struct platform_device *pdev) fsl_edma_irq_exit(pdev, fsl_edma); fsl_edma_cleanup_vchan(&fsl_edma->dma_dev); of_dma_controller_free(np); - dma_async_device_unregister(&fsl_edma->dma_dev); fsl_disable_clocks(fsl_edma, DMAMUX_NR); return 0; From patchwork Fri Aug 3 07:20:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0DE5B157D for ; Fri, 3 Aug 2018 07:22:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E91ED286B0 for ; Fri, 3 Aug 2018 07:22:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCC062C469; Fri, 3 Aug 2018 07:22:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83760286B0 for ; Fri, 3 Aug 2018 07:22:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729792AbeHCJQw (ORCPT ); Fri, 3 Aug 2018 05:16:52 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57210 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732737AbeHCJQv (ORCPT ); Fri, 3 Aug 2018 05:16:51 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 0639B14556867; Fri, 3 Aug 2018 15:25:28 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Rz1MkBeQqoG1; Fri, 3 Aug 2018 15:25:27 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 9CA941455686D; Fri, 3 Aug 2018 15:25:27 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 9CA941455686D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281127; bh=sTw1UU5qD7fkC1MT8wtHFAyBFEwMFPe8deeAAyKJf3U=; h=From:To:Subject:Date:Message-Id; b=OragWE493wIYKzgOU9JitevokFP+8PS6XDrayqOjB5a8FsULpbQEDCych1EOpEg4q 3ToIVeCHecn5mOdsWUAQZDJra1Mqy8HJfojsBDlCkJ1CwnYQl2km/zDtavHo8cBsce 9xnMYT0k7Sht7gHhaj+zZ5JzIqhZIWqTZlWaAHRc= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id F3ndg3WZgssX; Fri, 3 Aug 2018 15:25:27 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 5319B140B5B37; Fri, 3 Aug 2018 15:25:26 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 41/46] dmaengine: at_hdmac: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:11 +0800 Message-Id: <20180803072016.21544-42-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie --- drivers/dma/at_hdmac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 75f38d19fcbe..536146601238 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -1954,7 +1954,7 @@ static int __init at_dma_probe(struct platform_device *pdev) dma_has_cap(DMA_SLAVE, atdma->dma_common.cap_mask) ? "slave " : "", plat_dat->nr_channels); - dma_async_device_register(&atdma->dma_common); + dmaenginem_async_device_register(&atdma->dma_common); /* * Do not return an error if the dmac node is not present in order to @@ -1973,7 +1973,6 @@ static int __init at_dma_probe(struct platform_device *pdev) return 0; err_of_dma_controller_register: - dma_async_device_unregister(&atdma->dma_common); dma_pool_destroy(atdma->memset_pool); err_memset_pool_create: dma_pool_destroy(atdma->dma_desc_pool); @@ -2000,7 +1999,6 @@ static int at_dma_remove(struct platform_device *pdev) struct resource *io; at_dma_off(atdma); - dma_async_device_unregister(&atdma->dma_common); dma_pool_destroy(atdma->memset_pool); dma_pool_destroy(atdma->dma_desc_pool); From patchwork Fri Aug 3 07:20:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554689 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C408713BB for ; Fri, 3 Aug 2018 07:23:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8E9C2C451 for ; Fri, 3 Aug 2018 07:23:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B2FE2C4A9; Fri, 3 Aug 2018 07:23:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45E3A2C451 for ; Fri, 3 Aug 2018 07:23:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732313AbeHCJSI (ORCPT ); Fri, 3 Aug 2018 05:18:08 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57868 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732669AbeHCJQq (ORCPT ); Fri, 3 Aug 2018 05:16:46 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 610D51455686C; Fri, 3 Aug 2018 15:25:29 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id pVd05TpmKQLH; Fri, 3 Aug 2018 15:25:29 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id E015514556875; Fri, 3 Aug 2018 15:25:28 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai E015514556875 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281128; bh=ejPrVnB9CtqvxqJa/YPyb+cjeDYkd96NtXhy/IBIQK0=; h=From:To:Subject:Date:Message-Id; b=rP78sdgE+18qkrXZSWewxt6hmbOKA6aPyzIiwfwsK1aYt75j2lYI7+qq+/eGVLbi0 YZaIlr5eo2uniYsWUNHBFI9Didw8rcxsNeCfrzR3pz7OXpgpAU1Qotzc14P3yNLKgn NzVfWtSrhax5INnEnyMLHqms6/LaLcDwma40WRBY= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id UbsmcR8DOfoh; Fri, 3 Aug 2018 15:25:28 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 7AA401455686C; Fri, 3 Aug 2018 15:25:27 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 42/46] dmaengine: at_xdmac: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:12 +0800 Message-Id: <20180803072016.21544-43-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_dma_unregister Signed-off-by: Huang Shijie --- drivers/dma/at_xdmac.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index 4bf72561667c..c220f667be80 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -2041,7 +2041,7 @@ static int at_xdmac_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, atxdmac); - ret = dma_async_device_register(&atxdmac->dma); + ret = dmaenginem_async_device_register(&atxdmac->dma); if (ret) { dev_err(&pdev->dev, "fail to register DMA engine device\n"); goto err_clk_disable; @@ -2051,7 +2051,7 @@ static int at_xdmac_probe(struct platform_device *pdev) at_xdmac_xlate, atxdmac); if (ret) { dev_err(&pdev->dev, "could not register of dma controller\n"); - goto err_dma_unregister; + goto err_clk_disable; } dev_info(&pdev->dev, "%d channels, mapped at 0x%p\n", @@ -2059,8 +2059,6 @@ static int at_xdmac_probe(struct platform_device *pdev) return 0; -err_dma_unregister: - dma_async_device_unregister(&atxdmac->dma); err_clk_disable: clk_disable_unprepare(atxdmac->clk); err_free_irq: @@ -2075,7 +2073,6 @@ static int at_xdmac_remove(struct platform_device *pdev) at_xdmac_off(atxdmac); of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&atxdmac->dma); clk_disable_unprepare(atxdmac->clk); free_irq(atxdmac->irq, atxdmac); From patchwork Fri Aug 3 07:20:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B6BC9093 for ; Fri, 3 Aug 2018 07:22:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3403E2C451 for ; Fri, 3 Aug 2018 07:22:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27952286B0; Fri, 3 Aug 2018 07:22:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C69982C451 for ; Fri, 3 Aug 2018 07:22:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732850AbeHCJQy (ORCPT ); Fri, 3 Aug 2018 05:16:54 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57735 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732670AbeHCJQw (ORCPT ); Fri, 3 Aug 2018 05:16:52 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id D96BC1455686F; Fri, 3 Aug 2018 15:25:29 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ibrkgwYSh1EH; Fri, 3 Aug 2018 15:25:29 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 8AB2114556870; Fri, 3 Aug 2018 15:25:29 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 8AB2114556870 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281129; bh=wFyy7JV/hK38zSHu+jvvNX7SVjgqYRFDGo08N42P96Q=; h=From:To:Subject:Date:Message-Id; b=EHCokPj1hkqyDaeUfpQT9LEwZCHfy2O9XQbXme7At//+gtKwtDcWvHOMMvAPa/K8d sODhFrgb4Zi41a5lzqQC2W68ufU8CJAP+CYjng0w5S5eAmUlPElkbnSBokGk2NQufH 3IfgOBNYeBRCELLXpoKdsE0dxl5w9C60LnMW44i8= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3eqB7x0ZCGvS; Fri, 3 Aug 2018 15:25:29 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id DF13F14556874; Fri, 3 Aug 2018 15:25:28 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 43/46] dmaengine: dma-jz4780: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:13 +0800 Message-Id: <20180803072016.21544-44-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_unregister_dev Signed-off-by: Huang Shijie --- drivers/dma/dma-jz4780.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c index 85820a2d69d4..b2a244902bc5 100644 --- a/drivers/dma/dma-jz4780.c +++ b/drivers/dma/dma-jz4780.c @@ -847,7 +847,7 @@ static int jz4780_dma_probe(struct platform_device *pdev) jzchan->vchan.desc_free = jz4780_dma_desc_free; } - ret = dma_async_device_register(dd); + ret = dmaenginem_async_device_register(dd); if (ret) { dev_err(dev, "failed to register device\n"); goto err_disable_clk; @@ -858,15 +858,12 @@ static int jz4780_dma_probe(struct platform_device *pdev) jzdma); if (ret) { dev_err(dev, "failed to register OF DMA controller\n"); - goto err_unregister_dev; + goto err_disable_clk; } dev_info(dev, "JZ4780 DMA controller initialised\n"); return 0; -err_unregister_dev: - dma_async_device_unregister(dd); - err_disable_clk: clk_disable_unprepare(jzdma->clk); @@ -887,7 +884,6 @@ static int jz4780_dma_remove(struct platform_device *pdev) for (i = 0; i < JZ_DMA_NR_CHANNELS; i++) tasklet_kill(&jzdma->chan[i].vchan.task); - dma_async_device_unregister(&jzdma->dma_device); return 0; } From patchwork Fri Aug 3 07:20:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554657 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9731F157D for ; Fri, 3 Aug 2018 07:22:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E732286B0 for ; Fri, 3 Aug 2018 07:22:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 721062C469; Fri, 3 Aug 2018 07:22:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20886286B0 for ; Fri, 3 Aug 2018 07:22:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732670AbeHCJRA (ORCPT ); Fri, 3 Aug 2018 05:17:00 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:58213 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732709AbeHCJRA (ORCPT ); Fri, 3 Aug 2018 05:17:00 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 223F814556872; Fri, 3 Aug 2018 15:25:31 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id jhFo-M7nNTZg; Fri, 3 Aug 2018 15:25:30 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id CD87E1455687B; Fri, 3 Aug 2018 15:25:30 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai CD87E1455687B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281130; bh=g0artj/6uiXTZ0Awb0M9IlCS/jEKLN8ycLjuXH4i9mA=; h=From:To:Subject:Date:Message-Id; b=iGIPQaeviz85nxB/ZhoFqQ8Olhulu0MnV2ycAQQwBPHZXV4j8sDzuqaULoxrfzkq9 VJWBdYSGIeeGvIVfU5bKq9QbW1xV3C/D/Z6Q6nWyg8fCqOWcMS+2CE+3hVzJ2+isXz kLiuUVBWFIBmOlxi5DHM21AXStk91b48gJjOXhKg= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sENx-j6ZVKPJ; Fri, 3 Aug 2018 15:25:30 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 7C80614556865; Fri, 3 Aug 2018 15:25:29 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 44/46] dmaengine: dma-jz4740: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:14 +0800 Message-Id: <20180803072016.21544-45-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_unregister Signed-off-by: Huang Shijie --- drivers/dma/dma-jz4740.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/dma-jz4740.c b/drivers/dma/dma-jz4740.c index afd5e10f8927..30513a16e344 100644 --- a/drivers/dma/dma-jz4740.c +++ b/drivers/dma/dma-jz4740.c @@ -553,21 +553,19 @@ static int jz4740_dma_probe(struct platform_device *pdev) vchan_init(&chan->vchan, dd); } - ret = dma_async_device_register(dd); + ret = dmaenginem_async_device_register(dd); if (ret) goto err_clk; irq = platform_get_irq(pdev, 0); ret = request_irq(irq, jz4740_dma_irq, 0, dev_name(&pdev->dev), dmadev); if (ret) - goto err_unregister; + goto err_clk; platform_set_drvdata(pdev, dmadev); return 0; -err_unregister: - dma_async_device_unregister(dd); err_clk: clk_disable_unprepare(dmadev->clk); return ret; @@ -593,7 +591,6 @@ static int jz4740_dma_remove(struct platform_device *pdev) free_irq(irq, dmadev); jz4740_cleanup_vchan(&dmadev->ddev); - dma_async_device_unregister(&dmadev->ddev); clk_disable_unprepare(dmadev->clk); return 0; From patchwork Fri Aug 3 07:20:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1F85313BB for ; Fri, 3 Aug 2018 07:22:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06D96286B0 for ; Fri, 3 Aug 2018 07:22:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE4DF2C469; Fri, 3 Aug 2018 07:22:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B239286B0 for ; Fri, 3 Aug 2018 07:22:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727652AbeHCJRT (ORCPT ); Fri, 3 Aug 2018 05:17:19 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:57164 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732739AbeHCJQw (ORCPT ); Fri, 3 Aug 2018 05:16:52 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 10E3414556879; Fri, 3 Aug 2018 15:25:32 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id oxeSf0xP0lan; Fri, 3 Aug 2018 15:25:31 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 42FC514556877; Fri, 3 Aug 2018 15:25:31 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 42FC514556877 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281131; bh=HMv50tUv+bwDyIbJOht8l4tiQTzfkN+NHv5bWAMm32U=; h=From:To:Subject:Date:Message-Id; b=pz0Zd68l/dmLeFiywj+jcQUN/5SMe5kKa/7nRQq771307jJpjnLDDljjow4GA/k1n xtjg8O9GXAcBA+a2BGtNmpRXOS5rDD8KctsQ5s/bpzqq3QwZEcrKjyZZaxDlsVsiBL 6mdqTZFRjiR5PIfww1/NdaG0l0wZsxcN4AbGzY1k= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FJaGqLgJnup1; Fri, 3 Aug 2018 15:25:31 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id BBF6F14556879; Fri, 3 Aug 2018 15:25:30 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 45/46] dmaengine: dma-axi-dmac: use dmaenginem_async_device_register to simplify the code Date: Fri, 3 Aug 2018 15:20:15 +0800 Message-Id: <20180803072016.21544-46-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_unregister_device Signed-off-by: Huang Shijie --- drivers/dma/dma-axi-dmac.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 15b2453d2647..d510184762e6 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -678,14 +678,14 @@ static int axi_dmac_probe(struct platform_device *pdev) axi_dmac_write(dmac, AXI_DMAC_REG_IRQ_MASK, 0x00); - ret = dma_async_device_register(dma_dev); + ret = dmaenginem_async_device_register(dma_dev); if (ret) goto err_clk_disable; ret = of_dma_controller_register(pdev->dev.of_node, of_dma_xlate_by_chan_id, dma_dev); if (ret) - goto err_unregister_device; + goto err_clk_disable; ret = request_irq(dmac->irq, axi_dmac_interrupt_handler, IRQF_SHARED, dev_name(&pdev->dev), dmac); @@ -698,8 +698,6 @@ static int axi_dmac_probe(struct platform_device *pdev) err_unregister_of: of_dma_controller_free(pdev->dev.of_node); -err_unregister_device: - dma_async_device_unregister(&dmac->dma_dev); err_clk_disable: clk_disable_unprepare(dmac->clk); @@ -713,7 +711,6 @@ static int axi_dmac_remove(struct platform_device *pdev) of_dma_controller_free(pdev->dev.of_node); free_irq(dmac->irq, dmac); tasklet_kill(&dmac->chan.vchan.task); - dma_async_device_unregister(&dmac->dma_dev); clk_disable_unprepare(dmac->clk); return 0; From patchwork Fri Aug 3 07:20:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10554663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9B704157D for ; Fri, 3 Aug 2018 07:22:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8164D286B0 for ; Fri, 3 Aug 2018 07:22:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74FFC2C469; Fri, 3 Aug 2018 07:22:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0487C286B0 for ; Fri, 3 Aug 2018 07:22:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732835AbeHCJQy (ORCPT ); Fri, 3 Aug 2018 05:16:54 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:59738 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729813AbeHCJQx (ORCPT ); Fri, 3 Aug 2018 05:16:53 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 23DFB14556874; Fri, 3 Aug 2018 15:25:34 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Saz99B2AhKQW; Fri, 3 Aug 2018 15:25:32 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 1E4D41455687E; Fri, 3 Aug 2018 15:25:32 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 1E4D41455687E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533281132; bh=SUwpzQbE1dBuHteEo8GV++J2K752LQCpcXdmCCznyIg=; h=From:To:Subject:Date:Message-Id; b=OOSjPw5qAGCZrW26FNpLSjsLsQmKnh8ME7S2yC4wMhwMv3i17YNXDqfld/Snqq0Al yNHhoFblWL3YzRSUSh6i3dW1XGpUujj5TNZfYlcpBI8xj2flA1QqWN2rniuQrl8xD1 l5kIYDiAKfEug+tydZMfbYuuurAtQEuuChrPL8t8= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id MphS_Hx7VJYP; Fri, 3 Aug 2018 15:25:32 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 6326F1455687B; Fri, 3 Aug 2018 15:25:31 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, peter.ujfalusi@ti.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org, Huang Shijie Subject: [PATCH 46/46] dmaengine: add COMPILE_TEST for the drivers Date: Fri, 3 Aug 2018 15:20:16 +0800 Message-Id: <20180803072016.21544-47-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803072016.21544-1-sjhuang@iluvatar.ai> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We can do the compiling test with COMPILE_TEST. Thisi patch adds the COMPILE_TEST for the drivers. Signed-off-by: Huang Shijie --- drivers/dma/Kconfig | 24 ++++++++++++------------ drivers/dma/ti/Kconfig | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index d4a4230a7942..7670b2f967c4 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -85,14 +85,14 @@ config AMCC_PPC440SPE_ADMA config AT_HDMAC tristate "Atmel AHB DMA support" - depends on ARCH_AT91 + depends on ARCH_AT91 || COMPILE_TEST select DMA_ENGINE help Support the Atmel AHB DMA controller. config AT_XDMAC tristate "Atmel XDMA support" - depends on ARCH_AT91 + depends on ARCH_AT91 || COMPILE_TEST select DMA_ENGINE help Support the Atmel XDMA controller. @@ -163,7 +163,7 @@ config DMA_SA11X0 config DMA_SUN4I tristate "Allwinner A10 DMA SoCs support" - depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I + depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || COMPILE_TEST default (MACH_SUN4I || MACH_SUN5I || MACH_SUN7I) select DMA_ENGINE select DMA_VIRTUAL_CHANNELS @@ -240,7 +240,7 @@ config IMG_MDC_DMA config IMX_DMA tristate "i.MX DMA support" - depends on ARCH_MXC + depends on ARCH_MXC || COMPILE_TEST select DMA_ENGINE help Support the i.MX DMA engine. This engine is integrated into @@ -248,7 +248,7 @@ config IMX_DMA config IMX_SDMA tristate "i.MX SDMA support" - depends on ARCH_MXC + depends on ARCH_MXC || COMPILE_TEST select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help @@ -341,7 +341,7 @@ config MMP_TDMA config MOXART_DMA tristate "MOXART DMA support" - depends on ARCH_MOXART + depends on ARCH_MOXART || COMPILE_TEST select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help @@ -439,7 +439,7 @@ config PL330_DMA config PXA_DMA bool "PXA DMA support" - depends on (ARCH_MMP || ARCH_PXA) + depends on (ARCH_MMP || ARCH_PXA || COMPILE_TEST) select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help @@ -450,14 +450,14 @@ config PXA_DMA config SIRF_DMA tristate "CSR SiRFprimaII/SiRFmarco DMA support" - depends on ARCH_SIRF + depends on ARCH_SIRF || COMPILE_TEST select DMA_ENGINE help Enable support for the CSR SiRFprimaII DMA engine. config STE_DMA40 bool "ST-Ericsson DMA40 support" - depends on ARCH_U8500 + depends on ARCH_U8500 || COMPILE_TEST select DMA_ENGINE help Support for ST-Ericsson DMA40 controller @@ -538,7 +538,7 @@ config TXX9_DMAC config TEGRA20_APB_DMA bool "NVIDIA Tegra20 APB DMA support" - depends on ARCH_TEGRA + depends on ARCH_TEGRA || COMPILE_TEST select DMA_ENGINE help Support for the NVIDIA Tegra20 APB DMA controller driver. The @@ -579,7 +579,7 @@ config XGENE_DMA config XILINX_DMA tristate "Xilinx AXI DMAS Engine" - depends on (ARCH_ZYNQ || MICROBLAZE || ARM64) + depends on (ARCH_ZYNQ || MICROBLAZE || ARM64 || COMPILE_TEST) select DMA_ENGINE help Enable support for Xilinx AXI VDMA Soft IP. @@ -598,7 +598,7 @@ config XILINX_DMA config XILINX_ZYNQMP_DMA tristate "Xilinx ZynqMP DMA Engine" - depends on (ARCH_ZYNQ || MICROBLAZE || ARM64) + depends on (ARCH_ZYNQ || MICROBLAZE || ARM64 || COMPILE_TEST) select DMA_ENGINE help Enable support for Xilinx ZynqMP DMA controller. diff --git a/drivers/dma/ti/Kconfig b/drivers/dma/ti/Kconfig index e5e74e1361dc..a494789c5b87 100644 --- a/drivers/dma/ti/Kconfig +++ b/drivers/dma/ti/Kconfig @@ -4,7 +4,7 @@ config TI_CPPI41 tristate "Texas Instruments CPPI 4.1 DMA support" - depends on (ARCH_OMAP || ARCH_DAVINCI_DA8XX) + depends on (ARCH_OMAP || ARCH_DAVINCI_DA8XX || COMPILE_TEST) select DMA_ENGINE help The Communications Port Programming Interface (CPPI) 4.1 DMA engine