summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHongbo Yao <andy.xu@hj-micro.com>2025-04-01 08:42:48 +0300
committerWill Deacon <will@kernel.org>2025-04-17 16:27:34 +0300
commitfc5106088d6db75df61308ef6de314d1f7959646 (patch)
tree2d61ce0a355759fbea42f5e05543d3f0f08741d8
parent7f57afde6a44d9e044885e1125034edd4fda02e8 (diff)
downloadlinux-fc5106088d6db75df61308ef6de314d1f7959646.tar.xz
perf: arm-ni: Fix missing platform_set_drvdata()
Add missing platform_set_drvdata in arm_ni_probe(), otherwise calling platform_get_drvdata() in remove returns NULL. Fixes: 4d5a7680f2b4 ("perf: Add driver for Arm NI-700 interconnect PMU") Signed-off-by: Hongbo Yao <andy.xu@hj-micro.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/20250401054248.3985814-1-andy.xu@hj-micro.com Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r--drivers/perf/arm-ni.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/perf/arm-ni.c b/drivers/perf/arm-ni.c
index 0c418a7ee10f..de7b6cce4d68 100644
--- a/drivers/perf/arm-ni.c
+++ b/drivers/perf/arm-ni.c
@@ -660,6 +660,7 @@ static int arm_ni_probe(struct platform_device *pdev)
ni->num_cds = num_cds;
ni->part = part;
ni->id = atomic_fetch_inc(&id);
+ platform_set_drvdata(pdev, ni);
for (int v = 0; v < cfg.num_components; v++) {
reg = readl_relaxed(cfg.base + NI_CHILD_PTR(v));