ARM: imx: Assign parents for mmdc event_source devices
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 12 Apr 2024 16:10:52 +0000 (17:10 +0100)
committerShawn Guo <shawnguo@kernel.org>
Mon, 22 Apr 2024 05:41:58 +0000 (13:41 +0800)
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/
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/mach-imx/mmdc.c

index 25893d1091903fae1eb392c3b648117b366fb36a..b68cb86dbe4cf9c8291c21504d861c172ba2f667 100644 (file)
@@ -437,6 +437,7 @@ static int mmdc_pmu_init(struct mmdc_pmu *pmu_mmdc,
 {
        *pmu_mmdc = (struct mmdc_pmu) {
                .pmu = (struct pmu) {
+                       .parent         = dev,
                        .task_ctx_nr    = perf_invalid_context,
                        .attr_groups    = attr_groups,
                        .event_init     = mmdc_pmu_event_init,