perf/arm_pmu: Assign parents for event_source devices
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 12 Apr 2024 16:10:43 +0000 (17:10 +0100)
committerWill Deacon <will@kernel.org>
Fri, 19 Apr 2024 14:59:30 +0000 (15:59 +0100)
Currently the PMU device appears directly under /sys/devices/
Only root busses should appear there, so instead assign the pmu->dev
parent to be the platform device.

Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@kroah.com/
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240412161057.14099-17-Jonathan.Cameron@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm_pmu_platform.c

index 3596db36cbff4f99f096a6d2cbadb440b8c6ef03..4b1a9a92ea117b13ed6cd004d520bb53723c989d 100644 (file)
@@ -196,6 +196,7 @@ int arm_pmu_device_probe(struct platform_device *pdev,
        if (!pmu)
                return -ENOMEM;
 
+       pmu->pmu.parent = &pdev->dev;
        pmu->plat_device = pdev;
 
        ret = pmu_parse_irqs(pmu);