Message ID | 20180803072016.21544-35-sjhuang@iluvatar.ai (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <dmaengine-owner@kernel.org> 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 <patchwork-dmaengine@patchwork.kernel.org>; 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 <patchwork-dmaengine@patchwork.kernel.org>; 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 <patchwork-dmaengine@patchwork.kernel.org>; Fri, 3 Aug 2018 07:24:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732517AbeHCJTM (ORCPT <rfc822;patchwork-dmaengine@patchwork.kernel.org>); 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 <rfc822;dmaengine@vger.kernel.org>); 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 <sjhuang@iluvatar.ai> 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 <sjhuang@iluvatar.ai> 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: <dmaengine.vger.kernel.org> X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Use dmaenginem_async_device_register to simplify code
|
expand
|
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");
Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai> --- drivers/dma/mxs-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)