]> www.infradead.org Git - users/hch/block.git/commitdiff
perf/amlogic: Assign parents for event_source devices
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 12 Apr 2024 16:10:33 +0000 (17:10 +0100)
committerWill Deacon <will@kernel.org>
Fri, 19 Apr 2024 14:59:29 +0000 (15:59 +0100)
Currently all these devices appear directly under /sys/devices/
Only root busses should appear there, so instead assign the pmu->dev
parents to be the platform device.

Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@kroah.com/
Reviewed-by: Jiucheng Xu <jiucheng.xu@amlogic.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240412161057.14099-7-Jonathan.Cameron@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/amlogic/meson_ddr_pmu_core.c

index bbc7285fd934a3be5362d52c3e8c556da14e2fc2..07446d784a1a64ae54beec2cce75c9f6f522f83c 100644 (file)
@@ -492,6 +492,7 @@ int meson_ddr_pmu_create(struct platform_device *pdev)
        *pmu = (struct ddr_pmu) {
                .pmu = {
                        .module         = THIS_MODULE,
+                       .parent         = &pdev->dev,
                        .capabilities   = PERF_PMU_CAP_NO_EXCLUDE,
                        .task_ctx_nr    = perf_invalid_context,
                        .attr_groups    = attr_groups,