summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHongbo Yao <andy.xu@hj-micro.com>2025-04-01 13:42:48 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-19 15:31:35 +0200
commit8e43fa9c713a6d084a5732aa6dd41c734845f25e (patch)
treec0bb536c5736d9fb7379bdc49a6afb17db637018
parent7e958e116e3be05a1f869b5a885fc5d674c7725f (diff)
perf: arm-ni: Fix missing platform_set_drvdata()
[ Upstream commit fc5106088d6db75df61308ef6de314d1f7959646 ] 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> Signed-off-by: Sasha Levin <sashal@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 3f3d2e0f91fa..b87d3a9ba7d5 100644
--- a/drivers/perf/arm-ni.c
+++ b/drivers/perf/arm-ni.c
@@ -661,6 +661,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));