From patchwork Fri Sep 27 03:29: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: 174573 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2939155ill; Thu, 26 Sep 2019 20:30:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRaRM6DmtXhYMVyk9XN59XkjNL4gFPz1ElxwaymCMKWxmkCfHtKXwwgOPQhaNQLDe/68LL X-Received: by 2002:a17:906:65c2:: with SMTP id z2mr4049330ejn.31.1569555005685; Thu, 26 Sep 2019 20:30:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569555005; cv=none; d=google.com; s=arc-20160816; b=nWkOg0CHoUbPmLBPuit8wTqyBQ0X9dg+kX2gO5KDxXY3E3ncgLm9MEAGGQWWyPC5Rm KbWsUMl0m1KkIWLhOY+BzRo2HcNavijyjFX4mqTZq2P02cLfqAV6sIuZNN93tVTJhAmr 2I6fC9ki6x1xEan7rS1ttnJRfMZ42VRTA2HsRLJdsiv5k5k3fIlvl47utIHQEXcvtL1H VZsj3W3eCF74b+SqRy5ReRD4MMrW8+4bAfj4YkLpEcYA7IDduj6ssLNW/c7WxFJ73YSW G7gLai1sNhDR3YwvWUvU4a75Edo7Z9QmWxFl6NMsTiUTiXZpbkuJXkv5dYk56Q6EtFjr Ui4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=3fUQ2wevxoVB9of7yE52sU9E/NILQiAovPtEjfDhHSI=; b=fApPzLXUu6YQ/FzoGt7ZKpfT3a+E1LeczDyYRbEH/nYJaZ32sq5ru/zB2LWJq/qmCO hnN9O47FTlRQZ252hT8DekaJkG27PswHbMOVnHLQQQDJXhhYMLny376aq2mK6LCefV1y KGoi5hKZWAeT16KgSL9+BVm2HyE7AcICs3Srw1nhHRLW0l+4NneXBVwLFhF4mMQgANMa k02voyc3CKxEsFfABMCHR8gd3mo/rbN4VlClfRfRoa93G8e8YOU5tuwXfO9ETFq240Jb VTdoa2tRyjDI0iMbGDLXp02jS8nfbj/WlKZOZRHSjfldEO98NiSDQS47bXIJM2JACbdF P3Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O9bMdKw8; 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 k1si2147707ejj.174.2019.09.26.20.30.05; Thu, 26 Sep 2019 20:30:05 -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=O9bMdKw8; 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 S1727505AbfI0DaF (ORCPT + 3 others); Thu, 26 Sep 2019 23:30:05 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:43422 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726145AbfI0DaE (ORCPT ); Thu, 26 Sep 2019 23:30:04 -0400 Received: by mail-pf1-f194.google.com with SMTP id a2so693914pfo.10 for ; Thu, 26 Sep 2019 20:30:04 -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; bh=3fUQ2wevxoVB9of7yE52sU9E/NILQiAovPtEjfDhHSI=; b=O9bMdKw8cO5Q2wlyIDHcAUhYNbgKrh+mR8kF3DArk29wCYuc0N+J3CVrMKS1hjGqJe cfx2wihV5CmxVYMWcpBqDg3wYYYnfONcnOthmS2ymzXwjWZb8SC59d8/y02jfFjMdcQI rnn4HNNSvgyOXUmy+frN+luqQrpKGYKKeE5v5Hl8PupLPqHcLEUo0Ip1zA6LHsUZlBZ6 WVi6CTQwmrq+bAld5FeSH/xLRqR96x94t1ZtC7myJz46FcVQeSkDafn0HYQa958B5Mx6 bcFSjDnsCEWadfn4yEtZdp90b/PG0WDBCN6SiwN3OHMcR+UZifTjMohaIFMt09hCMF8i hWXg== 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; bh=3fUQ2wevxoVB9of7yE52sU9E/NILQiAovPtEjfDhHSI=; b=pZeRf75eZ0kGOK1YRtIIuuyXS4BcgluNob4uDqi72nA0LX5xd6+M5p9EgApSTRHQCU 9Oe1/OF0lr6Pi3jvOmDG+eQp03+3gY5Ra0LiCNNm5dI7EzGOePTRcS2udReCbYETSyzA gsEaj/EHfV19Nofmp68bOKNwbpcsPpJ9FKw6GieFTNqD5J+/u6TTe37K8VKiEQmyBb/c 2P0NtOT0jgg6Mh+uADVkryhpk+OarXRWrdTLwxGGEH7YblCwORjnlpt9MMMBxpKeTYgS FoFyqdSUQnJZNfWtMZ3zHymJtFohEp40r1Ul4/qUKfnGWAJAp8BfFKUbU1ErPHwWcWv8 0dlw== X-Gm-Message-State: APjAAAUiZfk0GlMfypy+qs6vOGIPGyZTT7hW/txcBGOtQrdYN0peCQMf 8wv0lwvucDV0oEZW2ZIASVTyzQ== X-Received: by 2002:a63:cf4a:: with SMTP id b10mr6916116pgj.276.1569555003985; Thu, 26 Sep 2019 20:30:03 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id a11sm674857pfo.165.2019.09.26.20.30.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Sep 2019 20:30:03 -0700 (PDT) From: Baolin Wang To: vkoul@kernel.org Cc: orsonzhai@gmail.com, zhang.lyra@gmail.com, dan.j.williams@intel.com, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, baolin.wang@linaro.org Subject: [PATCH] dmaengine: sprd: Change to use devm_platform_ioremap_resource() Date: Fri, 27 Sep 2019 11:29:43 +0800 Message-Id: <1af3efdac3b217203cace090c8947386854c0144.1569554639.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together, which can simpify the code. Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.7.9.5 diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index a4a91f2..60d2c6b 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -1065,7 +1065,6 @@ static int sprd_dma_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct sprd_dma_dev *sdev; struct sprd_dma_chn *dma_chn; - struct resource *res; u32 chn_count; int ret, i; @@ -1111,8 +1110,7 @@ static int sprd_dma_probe(struct platform_device *pdev) dev_warn(&pdev->dev, "no interrupts for the dma controller\n"); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sdev->glb_base = devm_ioremap_resource(&pdev->dev, res); + sdev->glb_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(sdev->glb_base)) return PTR_ERR(sdev->glb_base);