From patchwork Tue May 7 06:09:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10932325 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 EC12F924 for ; Tue, 7 May 2019 06:11:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7225288E2 for ; Tue, 7 May 2019 06:11:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8F8128915; Tue, 7 May 2019 06:11: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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6FD5E288E2 for ; Tue, 7 May 2019 06:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=OE6Gis3qHJTzNuLPHS/nGQcDMF2UFYxWxk24r9+bIRQ=; b=X0SCJ02hDjTXyoK7ikypYE2c6U u+H3XGu7eWzfK3V8IlE4JcFYF9AJIaFstsYJOQK6s/OjO2+2+6UFL7/yANPGcSOf0JhZIQBd9pUpb EC2ALr7qVlLgJCJe6AlN6PNo7PgzltxOxNlqI/BmeZPNNchPfXa61U75rozPxzb5f6Q/rAjl3dy7Q gLSnode7tVCjjEDjtnGK4/f/tItHyHD+w3jx445tK3O26kx63qJSUgoi4hhrA43pN/m4uNUM8+guy YKKlw7cbSdixdbNVBujv0B64etydSscFljEQ5Gamt8lGdMPilVzlZjELBkNjEkzYOFTOAZGGbx3vb w17IZ+jQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hNtJu-0007XJ-99; Tue, 07 May 2019 06:11:18 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hNtJH-0006do-5M for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2019 06:10:57 +0000 Received: by mail-pf1-x442.google.com with SMTP id j11so8055260pff.13 for ; Mon, 06 May 2019 23:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=MjWLMAdBW11KI57uPKHpmOc8QO2EQsc2Bw5TFtq2aeM=; b=EPTCkX6PIWp6H6mHi0TmZyBHNTkNiDCOjwIvq4y+k7bAcUKgg+aAQYSeUiGtcEFhac uMQAb8Ce8bUqBZz0qzb3QD+1St8FT3LKJBOg2WJ79dLdgMiEnyhT6dED9GpA50HiDYXN g0cKvEmfcBjAZftLALFM6YJyyLCO2jGotOdpdiT+Jjqk4ZyUCejl/+4S7hjOJBIeAEgH EAM3+6a/PJghpLImXKKWgX2TNnpm0v9a0iYFb5ZHU9heUH6Nziw1o22ZNlXNQi/VzWyP yMjMvo3QcgAZii1n18z4Ol2nN+x5pdXG7MSREtWPwYDbLaQVwGa4WWigS7aVj5XMz8ac hXmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=MjWLMAdBW11KI57uPKHpmOc8QO2EQsc2Bw5TFtq2aeM=; b=fzfs1OYfSl9EMwTneLnX0tzzrODKbUz/UxGKqkh4MjSWulHIcP/CEVbGTPAJ8T8oNS dyCmKHtZr102RnHeliRU4s821hNEfRM4dVKIbQZ0XDJT8BTR3PuLUf9TAsDKZXSMzSfM ahltEPRh4HYIUlcJV4iLqWgoPQfC1zC4iK5hjsp2dje6ottuaXYAB2JwaaYhNROUiDU1 peW073rrHrUn7tn/lcNDyxm0uquesC6oee3zUeK9c3K1u4+xkF0UGoAbX3+U8kpgnQD3 N39Y/6PtCpOUP8ouh8sU1QWtgCJJGOesQOczPNvBx4F7DDruUWBGIwu4d8/CfN8mqkj3 mfKQ== X-Gm-Message-State: APjAAAV3shXsJqNUlFsMScWn3GcBxGP+FdeJ3JgqmIIusdEsQ7tGFPiY HhnR697ykmEz6vJVug74u8zGEg== X-Google-Smtp-Source: APXvYqxLVILAxDHZN2kRQScJnvark6ssZgdEGaBWmo/QMwC9MFS0hSHYzRT49kNXNOF1nEGRxtcIsw== X-Received: by 2002:aa7:90ca:: with SMTP id k10mr1280408pfk.20.1557209438341; Mon, 06 May 2019 23:10:38 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id e184sm30786325pfc.102.2019.05.06.23.10.33 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 May 2019 23:10:37 -0700 (PDT) From: Baolin Wang To: dan.j.williams@intel.com, vkoul@kernel.org Subject: [PATCH 6/8] dmaengine: mxs-dma: Let the core do the device node validation Date: Tue, 7 May 2019 14:09:43 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190506_231039_556181_D053B4E7 X-CRM114-Status: GOOD ( 11.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jroedel@suse.de, vincent.guittot@linaro.org, Zubair.Kakakhel@imgtec.com, baolin.wang@linaro.org, dmaengine@vger.kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, jonathanh@nvidia.com, wsa+renesas@sang-engineering.com, thierry.reding@gmail.com, linux-imx@nxp.com, kernel@pengutronix.de, linux-tegra@vger.kernel.org, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang --- drivers/dma/mxs-dma.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 22cc7f6..8ce5e79 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -716,7 +716,6 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma) } struct mxs_dma_filter_param { - struct device_node *of_node; unsigned int chan_id; }; @@ -727,9 +726,6 @@ static bool mxs_dma_filter_fn(struct dma_chan *chan, void *fn_param) struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma; int chan_irq; - if (mxs_dma->dma_device.dev->of_node != param->of_node) - return false; - if (chan->chan_id != param->chan_id) return false; @@ -752,13 +748,13 @@ static struct dma_chan *mxs_dma_xlate(struct of_phandle_args *dma_spec, if (dma_spec->args_count != 1) return NULL; - param.of_node = ofdma->of_node; param.chan_id = dma_spec->args[0]; if (param.chan_id >= mxs_dma->nr_channels) return NULL; - return dma_request_channel(mask, mxs_dma_filter_fn, ¶m); + return __dma_request_channel(&mask, mxs_dma_filter_fn, ¶m, + ofdma->of_node); } static int __init mxs_dma_probe(struct platform_device *pdev)