Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp129059imm; Fri, 3 Aug 2018 00:24:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf4CDsJNRpSTIOunzAGffdCu9gSDPcIt3WzjsC3DjNgo7kEl3B8DmOpPJHsJ+VIN9t/r4rE X-Received: by 2002:a17:902:bf44:: with SMTP id u4-v6mr2492061pls.84.1533281070321; Fri, 03 Aug 2018 00:24:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533281070; cv=none; d=google.com; s=arc-20160816; b=LyRfO9MaIkOL6XSrGQjF4Yrw40rMVBcKDqTQ6IvzqeWiqLdXCf5G3ESacie1AxL6n7 wDqeqe6iqUOtMk/HoP8OwgRIBESxxZRXNlRuPF71etUu7F6z/3CoMGCnJdQEVcDZPQIc E2UoHreLARj3Wf0LrP0nxo3CEvMFvu+HEJsdqASfMN9ZsXeiIClWZJU/iEUbymcI+5ZM TptnRKmUysO1s3psgjiPHxmXrAd4B5B+6HVfGU9VunIjKgH0psmpHK7g96UVJrxkT3k3 7fr9WvKyq9Tvv+XhnXPboEJnZeXjwkkrjsBQKhk66b68O68ry88EXSdS+Ssu8u6L1MXG QHhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=yokq+J9xdJRpn6yDKc3HUxfNPmMCa2VnExcS/vsCY7w=; b=jTZCZC/kKXf3H3ZUggppgswwu0J5fPnTh+QURmCo8nBDnztQYXfdFW+KTXiMfuINSa 9F020A7ZjvfrNLcSEmvKKGZFop/jNk8BK25DqGBWW3Nfi19cIMIEYEKuj6k1itl5UMM1 6aH2VtOkFGNajT0vD2Jk4PFpoI7HRM+GnSczkGZ+ZutlqyW4+MfTdQMyRMAfKKBoxzO6 y8aOi0NSVMz/Z4PBlm/ENS+7RnyBQMKjTmn4xRNsNrGBcDA+aj+ACZAOO0DLzHVPr/xG f8Ken6TpunzVeTL7GcKJFJ8aqtR/qYhHkowcVmnvtZmHTNRYjTvVf2vXW+SuvpboIkof 4OZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@iluvatar.ai header.s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB header.b=bn3pxKbl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=iluvatar.ai Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b76-v6si4402529pfl.223.2018.08.03.00.24.15; Fri, 03 Aug 2018 00:24:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@iluvatar.ai header.s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB header.b=bn3pxKbl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=iluvatar.ai Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732136AbeHCJRx (ORCPT + 99 others); Fri, 3 Aug 2018 05:17:53 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.17.1