From patchwork Mon Aug 6 08:52:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 10556699 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 EF3FA13B4 for ; Mon, 6 Aug 2018 08:53:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAFF12922F for ; Mon, 6 Aug 2018 08:53:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC34C29238; Mon, 6 Aug 2018 08:53:08 +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 2F2162922F for ; Mon, 6 Aug 2018 08:53:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726746AbeHFLBI (ORCPT ); Mon, 6 Aug 2018 07:01:08 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:26423 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726572AbeHFLBI (ORCPT ); Mon, 6 Aug 2018 07:01:08 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id E794B13DD8B2D; Mon, 6 Aug 2018 16:56:41 +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 lu8DbHL9GpCL; Mon, 6 Aug 2018 16:56:41 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 84438134C2A1D; Mon, 6 Aug 2018 16:56:41 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 84438134C2A1D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533545801; bh=k1TjHj/KLV3jAEB2pfmlT7sqD32G2LiXqX8buCZdeK8=; h=From:To:Subject:Date:Message-Id; b=P6WgdcsAHXVdG7+mPCgtCwt2HjqSkNOHzAzIqaxR7S45rmr1ZKpSm7cupyKuMAoKl UwLgd99gzP/w3hXOIfhaE1p2CpvNEp1DYuRPVFkm6zztTIMjwGneFsK/lCSHOGFjk6 NWUDYnjiiZp3A+kmjmGJqhHTJUArYUdcyniRcotI= 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 KqQFjSwZkG1l; Mon, 6 Aug 2018 16:56:41 +0800 (CST) Received: from localhost.localdomain (unknown [180.166.124.10]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 27E3C13245E53; Mon, 6 Aug 2018 16:56:41 +0800 (CST) From: Huang Shijie To: vkoul@kernel.org Cc: dan.j.williams@intel.com, Zubair.Kakakhel@imgtec.com, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, patrice.chotard@st.com, linus.walleij@linaro.org, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, Eugeniy.Paltsev@synopsys.com, colin.king@canonical.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Huang Shijie Subject: [PATCH v2 3/9] dmaengine: st_fdma: use dmaenginem_async_device_register to simplify the code Date: Mon, 6 Aug 2018 16:52:25 +0800 Message-Id: <20180806085231.4597-4-sjhuang@iluvatar.ai> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180806085231.4597-1-sjhuang@iluvatar.ai> References: <20180806085231.4597-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/st_fdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/st_fdma.c b/drivers/dma/st_fdma.c index bfb79bd0c6de..7eafccd4f7f5 100644 --- a/drivers/dma/st_fdma.c +++ b/drivers/dma/st_fdma.c @@ -833,7 +833,7 @@ static int st_fdma_probe(struct platform_device *pdev) fdev->dma_device.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); fdev->dma_device.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; - ret = dma_async_device_register(&fdev->dma_device); + ret = dmaenginem_async_device_register(&fdev->dma_device); if (ret) { dev_err(&pdev->dev, "Failed to register DMA device (%d)\n", ret); @@ -852,7 +852,6 @@ static int st_fdma_probe(struct platform_device *pdev) return 0; err_dma_dev: - dma_async_device_unregister(&fdev->dma_device); err_rproc: st_fdma_free(fdev); st_slim_rproc_put(fdev->slim_rproc); @@ -867,7 +866,6 @@ static int st_fdma_remove(struct platform_device *pdev) devm_free_irq(&pdev->dev, fdev->irq, fdev); st_slim_rproc_put(fdev->slim_rproc); of_dma_controller_free(pdev->dev.of_node); - dma_async_device_unregister(&fdev->dma_device); return 0; }