linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jay Chen <jkchen@linux.alibaba.com>
To: will@kernel.org, mark.rutland@arm.com,
	linux-arm-kernel@lists.infradead.org
Cc: Jay Chen <jkchen@linux.alibaba.com>
Subject: [RFC PATCH v1 1/2] perf/smmuv3: To simplify code for ioremap page in pmcg
Date: Mon,  6 Jul 2020 19:22:45 +0800	[thread overview]
Message-ID: <20200706112246.92220-2-jkchen@linux.alibaba.com> (raw)
In-Reply-To: <20200706112246.92220-1-jkchen@linux.alibaba.com>

Use the devm_platform_get_and_ioremap_resource to simplify the code
a bit.

Signed-off-by: Jay Chen <jkchen@linux.alibaba.com>
---
 drivers/perf/arm_smmuv3_pmu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
index 48e28ef93a70..2d09f3e47d12 100644
--- a/drivers/perf/arm_smmuv3_pmu.c
+++ b/drivers/perf/arm_smmuv3_pmu.c
@@ -755,8 +755,7 @@ static int smmu_pmu_probe(struct platform_device *pdev)
 		.capabilities	= PERF_PMU_CAP_NO_EXCLUDE,
 	};
 
-	res_0 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	smmu_pmu->reg_base = devm_ioremap_resource(dev, res_0);
+	smmu_pmu->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res_0);
 	if (IS_ERR(smmu_pmu->reg_base))
 		return PTR_ERR(smmu_pmu->reg_base);
 
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-07-06 11:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 11:22 [RFC PATCH v1 0/2] perf/smmuv3: dts get opt and simplify code Jay Chen
2020-07-06 11:22 ` Jay Chen [this message]
2020-07-06 11:22 ` [RFC PATCH v1 2/2] perf/smmuv3: To support the dts to get options Jay Chen
2020-07-06 15:03   ` Robin Murphy
2020-07-07 15:01     ` Jean-Philippe Brucker
2020-07-13 23:25       ` Rob Herring
2020-07-14  9:35         ` Robin Murphy
2020-07-13 20:46 ` [RFC PATCH v1 0/2] perf/smmuv3: dts get opt and simplify code Will Deacon
2020-07-13 23:15   ` Rob Herring
2020-07-14  7:48     ` Will Deacon
2020-07-14  7:49       ` Will Deacon
2020-07-14 22:26       ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200706112246.92220-2-jkchen@linux.alibaba.com \
    --to=jkchen@linux.alibaba.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).