Skip to content

Commit fc51060

Browse files
hober-yaowilldeacon
authored andcommitted
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: 4d5a768 ("perf: Add driver for Arm NI-700 interconnect PMU") Signed-off-by: Hongbo Yao <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 7f57afd commit fc51060

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/perf/arm-ni.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ static int arm_ni_probe(struct platform_device *pdev)
660660
ni->num_cds = num_cds;
661661
ni->part = part;
662662
ni->id = atomic_fetch_inc(&id);
663+
platform_set_drvdata(pdev, ni);
663664

664665
for (int v = 0; v < cfg.num_components; v++) {
665666
reg = readl_relaxed(cfg.base + NI_CHILD_PTR(v));

0 commit comments

Comments
 (0)