perf/imx_ddr: Assign parents for event_source devices
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 12 Apr 2024 16:10:42 +0000 (17:10 +0100)
committerWill Deacon <will@kernel.org>
Fri, 19 Apr 2024 14:59:30 +0000 (15:59 +0100)
Currently all this device appear 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/
Cc: Frank Li <Frank.li@nxp.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240412161057.14099-16-Jonathan.Cameron@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/fsl_imx8_ddr_perf.c

index 4e8fa5a48fcfe0477e8a869af4ea83a759632ba7..1bbdb29743c442c2a2a840b3154aa80f22b26da4 100644 (file)
@@ -651,6 +651,7 @@ static int ddr_perf_init(struct ddr_pmu *pmu, void __iomem *base,
        *pmu = (struct ddr_pmu) {
                .pmu = (struct pmu) {
                        .module       = THIS_MODULE,
+                       .parent      = dev,
                        .capabilities = PERF_PMU_CAP_NO_EXCLUDE,
                        .task_ctx_nr = perf_invalid_context,
                        .attr_groups = attr_groups,