From patchwork Mon May 20 11:32:17 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: 164593 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp167749ili; Mon, 20 May 2019 04:32:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmMJh/TXAXneLF4zAkq80eq6A91DuIJ0Uvr2gB62SQlG4EYr3bVrG7ac/A+NrnLKwGPaSq X-Received: by 2002:a63:ee10:: with SMTP id e16mr69322629pgi.207.1558351972813; Mon, 20 May 2019 04:32:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558351972; cv=none; d=google.com; s=arc-20160816; b=EOrQHSqeZ6mzOZsK2yvh+H4UE0KNjr6iZPj9S/jKLkTPk/X2AOdBxjo9o5A0fSAXJX TprthWU6Nv/TsgMW3Pidfi6qTLIqtnwYnOaBRU1SVoFGR3tPZAWBhIsArurYru8nr7Wr u4g3V3LkoB9NawTiKWqHpSR8fmXiayGHcIzquS3u3cB4/EcShoSBiIDko0asD+Roou9z SDxVrmnWyzaiuOj0cjdAYIW5oVlpg36Ue0h84xTkUYjY/ZXRU2m8COKNs+nRXjP+gwZA ZkDFK4JJkziGRh+QfTuZj8FaoZmVY73ep8MeOvURNutSB3ocdZ6dCvmYI53QYnJhHNgO DtVw== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=Cnx84NxIhSp4uZgqi6VSWZYaVNVqt10XSPlG8JL56aM=; b=E9i2IE+duLHdZEhunv826gFoMmAGfaeoiL9j0PgtDRWsAKJEjszbkLsCeKM3o3aUG4 jYqGN5jeBhp3ICyQaj//coLlNDJOCKkMyOZeh14468qGGrkOqWd/dst3lrDWnnqJ1K0g nrmYt/m2Y6Pq/fHOy81sXaibmXutcG7/jYSAnlNymQl7rtPxD69+6/ym4yfveJFfecnK 1IkwMd/HjuKxbAR/etiW2giwx2lotK9GKyeV/+3zbk5zT7yE5KrYWJfQFo/mpiamntxa i3Dap7k8f5L9G0NedY6uJTbtejRLaYXc9vEZ6JaddBiImke7CjN4T87JErmndr7pVgi8 KuIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mc4UZBCT; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e40si20049367plb.180.2019.05.20.04.32.52; Mon, 20 May 2019 04:32:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-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=@linaro.org header.s=google header.b=Mc4UZBCT; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732919AbfETLcw (ORCPT + 3 others); Mon, 20 May 2019 07:32:52 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33308 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732932AbfETLcw (ORCPT ); Mon, 20 May 2019 07:32:52 -0400 Received: by mail-pg1-f194.google.com with SMTP id h17so6686695pgv.0 for ; Mon, 20 May 2019 04:32:51 -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=Cnx84NxIhSp4uZgqi6VSWZYaVNVqt10XSPlG8JL56aM=; b=Mc4UZBCTGeP16M5dC8d43FPiSMsrdIIRD0s1wJ3KIvGHw+JOobzUKZHB0Q73iG3BTg V1l22QS5KJy5tXZPxHsQ9Mo7fVFBsMD7FRweoPvewbBbo62lTppD8pPJHBkor7ekGe3j PPFqi5Wdl4B9MzR3QJGHoKzN9KO9A5aa2u6lsjS6tZ9ohu5PS1AQTwdCEgh1IVHPURc5 Py3c2rYZyRrff+CtksSQP1kLT7g3w0aSUXqFbK2960r8YJHBAG0F6FtkWv/SXPaG5Gq8 XKa7McsxohMfNawU7tUAhFpQfWCIpWFs89ePwMm5HMMISDMi9KE0isl13qia+OwjzVYJ H+fg== 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=Cnx84NxIhSp4uZgqi6VSWZYaVNVqt10XSPlG8JL56aM=; b=UTrXUk8DQXGaPM2LYl0m4obl0OSwUBZc63BlJuqy+rv12NoQchUC8Kfggyf5BxPIUl veMv30IpCTaam/YR3RiHs3C6JMmrV51MmOYYuSNPms+Grl/jHINu6vt7nTl7TH2o0kTO OxN51aQQr7Ayn6Y9swYiecDYfUFqJI2rLDlf7GSgDM5Iou3FVt3pzB6aoS0D5I+JWrVt Sr107N431Zp9CG7OTj/lPPTDCcXGJSPny/wOJAIenBSxeWWDdGRMU5Sqdm2RXROq3ID5 ehiXD7g+Uiq/qSQMPpYZ9W/AGAMcZfDEiSTohDvB4k7pNtXSKXZNKd/3SIhAjR/tLG7m E8HA== X-Gm-Message-State: APjAAAUb8P+smEodsOFpmYmno93otjCcvi4120KZxwK8VNXh2umqnXd5 kzsSlfreNHaUA13vb5YsqcbE6g== X-Received: by 2002:a65:42cd:: with SMTP id l13mr21734824pgp.72.1558351971654; Mon, 20 May 2019 04:32:51 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id z124sm21310020pfz.116.2019.05.20.04.32.47 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 May 2019 04:32:51 -0700 (PDT) From: Baolin Wang To: dan.j.williams@intel.com, vkoul@kernel.org Cc: thierry.reding@gmail.com, jonathanh@nvidia.com, linux-tegra@vger.kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, wsa+renesas@sang-engineering.com, jroedel@suse.de, vincent.guittot@linaro.org, baolin.wang@linaro.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 4/8] dmaengine: dma-jz4780: Let the core do the device node validation Date: Mon, 20 May 2019 19:32:17 +0800 Message-Id: <231f063f65d0f4ca9a69edfb267fb82500954415.1558351667.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang --- drivers/dma/dma-jz4780.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 1.7.9.5 diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c index 9ce0a38..7e1d381 100644 --- a/drivers/dma/dma-jz4780.c +++ b/drivers/dma/dma-jz4780.c @@ -160,7 +160,6 @@ struct jz4780_dma_dev { }; struct jz4780_dma_filter_data { - struct device_node *of_node; uint32_t transfer_type; int channel; }; @@ -765,8 +764,6 @@ static bool jz4780_dma_filter_fn(struct dma_chan *chan, void *param) struct jz4780_dma_dev *jzdma = jz4780_dma_chan_parent(jzchan); struct jz4780_dma_filter_data *data = param; - if (jzdma->dma_device.dev->of_node != data->of_node) - return false; if (data->channel > -1) { if (data->channel != jzchan->id) @@ -790,7 +787,6 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec, if (dma_spec->args_count != 2) return NULL; - data.of_node = ofdma->of_node; data.transfer_type = dma_spec->args[0]; data.channel = dma_spec->args[1]; @@ -815,7 +811,8 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec, return dma_get_slave_channel( &jzdma->chan[data.channel].vchan.chan); } else { - return dma_request_channel(mask, jz4780_dma_filter_fn, &data); + return __dma_request_channel(&mask, jz4780_dma_filter_fn, &data, + ofdma->of_node); } }