From patchwork Mon May 20 11:32:21 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: 164597 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp168128ili; Mon, 20 May 2019 04:33:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxj8C8CUxxKTi930UHrArk7lijrANaUDDhncyheFCE9u//Np9DjqSYnPFGqJzDcCIJfyX4j X-Received: by 2002:a17:902:12f:: with SMTP id 44mr29078728plb.137.1558351993698; Mon, 20 May 2019 04:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558351993; cv=none; d=google.com; s=arc-20160816; b=aa/G2V1IoUK2oFFG6t/ukh6tX5t/h9+JTJXL8M/ExclgEH0Ks4nqDUNGMCiJ3zXHgf 02YdVyzlP5QIJXgcgc5enpYcy0mxPbzTty5ttG2Wlmc4/UXgC9o9mYsVPDKKcK62VbSJ 5s5hGhkieNMiWJkjFa1Q8ThiuTUcolq15zwD8GXR+RdeUYYtbmWCN4yp2muuQYgc5wKX eB3PUA2Q4afwfQQUfXGN0jS3bxWTfAOZ9mRiU3TRaBAx8JctJtKfNFwDo7FWu8YXdieX my58/vauB5u4Wjm72aZLtE3fxp+kBPKLOA/PwAfrb7nYad/JQZKDBiPBmAJ47ptKD1wk pH1Q== 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=kSx/2bQ8k2nUJmyS2liy45fCcO2iYHSDnrOKKw/RGV4=; b=ksO6JKKe5hLb5BFoYVUaLGErQSIFSmEt3OAwTrnWxvmYUEjdZLAB+2r4d4moUhRs0T m5VZr/8I0EDnekPVI3FaunSViDZfA8MgSDExrWLpRr3//BmxEpArBvRHdN9PMVNU/eJ2 Pu0y2F6vMuloSyWyUragjS96EdK84d/WOAYBaSerz4yZOoJEMdQYxY7YhKgUBfijpj+I H3i1ULyk2ArwjSmr+VDccspeDg1P3qqJwRIT3L/mH1/OF9gzbykWbBs/8S7PfnKDP4ps /osqzKyxSlp96IQqqKuhVLgymEm98mQdo7Y75yiRUkWBwSpNygAnRht8v7SDm5L2+gYo X/qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cPRtb7tQ; 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=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 w5si3854732pga.550.2019.05.20.04.33.13; Mon, 20 May 2019 04:33:13 -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=@linaro.org header.s=google header.b=cPRtb7tQ; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733008AbfETLdM (ORCPT + 30 others); Mon, 20 May 2019 07:33:12 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:46744 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732996AbfETLdL (ORCPT ); Mon, 20 May 2019 07:33:11 -0400 Received: by mail-pl1-f195.google.com with SMTP id r18so6586142pls.13 for ; Mon, 20 May 2019 04:33:11 -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=kSx/2bQ8k2nUJmyS2liy45fCcO2iYHSDnrOKKw/RGV4=; b=cPRtb7tQHJTTiLOHkiEpYP+wKGEqufi5OlZI8LAVDn750p0hkPo7BlZXT75VNfp9dR bKCNesFU3UCDsME+gGsOPK0VHvOUsTWH5NPfg+xK8mJwmFd5vbJmaO0EKQMFmNQ+n19H U8mqxoNBif5syGeoUe2lEXsWbDC1YB0BzSBgumFCN8STOyMNeJCtTeNLvgnvh10BAtQu 5J6eaQFuVUuyZhLT2t+Y0NRhAjRTWOVvbNG74UrINXey6BdbxtdfZyTEs6vh0o0X64Ku AulkUGud8AZoQWHpwMC3klVwa3PQ8CDJYu9MkPTAavxbcDPzAhTfuFpg/fcSO03u0aXx CAKg== 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=kSx/2bQ8k2nUJmyS2liy45fCcO2iYHSDnrOKKw/RGV4=; b=KqwuHo6Wj5/hwxgcdG9sk0hE6lPMrz/WWxxPfXqTxmetbt9MrKmmHSR3s3ganm9T0a uRu4sGU80msZNGB9kNvdI7oDzVcRhLLUKRFYB+qjn0KmEu0YBJvKj4P+AwyvJ/2Kv8WL 7ZfpvfHnX7NjHhZqb4jwZMxuZKkLy3iBbK4SwlisM1fSiNSDC7JIzkue8u3yN/r9fMkh i9Y2JjgovoLBnIP2e+2GCXVUb2ygwxlP+Y6DSoUS+g6I0iGrv7LR1+aZxJ+noukC0CED AuHkV+0MFb+3y9afYm4wOTsqkLEoL5fzWC4R/gHffus/54vDML1ioixd8FpUg1Ldo4+k CUgg== X-Gm-Message-State: APjAAAWJrF/nz4um7QNDDJPRqMZ7ZpKeg+GdLUKlZVVFZ+7dA5Gqvrza uCdCVOKLE0efET1qi7j6dklwqA== X-Received: by 2002:a17:902:18b:: with SMTP id b11mr50155937plb.264.1558351990778; Mon, 20 May 2019 04:33:10 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id z124sm21310020pfz.116.2019.05.20.04.33.05 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 May 2019 04:33:10 -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 8/8] dmaengine: sh: usb-dmac: Let the core do the device node validation Date: Mon, 20 May 2019 19:32:21 +0800 Message-Id: <0b4418a1891261a6a4f8e8356b68e38f4ed6a1d5.1558351667.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang --- drivers/dma/sh/usb-dmac.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 1.7.9.5 diff --git a/drivers/dma/sh/usb-dmac.c b/drivers/dma/sh/usb-dmac.c index 59403f6..0afabf3 100644 --- a/drivers/dma/sh/usb-dmac.c +++ b/drivers/dma/sh/usb-dmac.c @@ -636,9 +636,6 @@ static bool usb_dmac_chan_filter(struct dma_chan *chan, void *arg) struct usb_dmac_chan *uchan = to_usb_dmac_chan(chan); struct of_phandle_args *dma_spec = arg; - if (dma_spec->np != chan->device->dev->of_node) - return false; - /* USB-DMAC should be used with fixed usb controller's FIFO */ if (uchan->index != dma_spec->args[0]) return false; @@ -659,7 +656,8 @@ static struct dma_chan *usb_dmac_of_xlate(struct of_phandle_args *dma_spec, dma_cap_zero(mask); dma_cap_set(DMA_SLAVE, mask); - chan = dma_request_channel(mask, usb_dmac_chan_filter, dma_spec); + chan = __dma_request_channel(&mask, usb_dmac_chan_filter, dma_spec, + ofdma->of_node); if (!chan) return NULL;