diff mbox series

[v2,24/30] arc: Assign parents for event_source devices

Message ID 20240412161057.14099-25-Jonathan.Cameron@huawei.com (mailing list archive)
State New
Headers show
Series Add parents to struct pmu -> dev | expand

Commit Message

Jonathan Cameron April 12, 2024, 4:10 p.m. UTC
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: Vineet Gupta <vgupta@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 arch/arc/kernel/perf_event.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c
index adff957962da..bd4c2c110afe 100644
--- a/arch/arc/kernel/perf_event.c
+++ b/arch/arc/kernel/perf_event.c
@@ -788,6 +788,7 @@  static int arc_pmu_device_probe(struct platform_device *pdev)
 	arc_pmu->attr_groups[ARCPMU_ATTR_GR_FORMATS] = &arc_pmu_format_attr_gr;
 
 	arc_pmu->pmu = (struct pmu) {
+		.parent		= &pdev->dev,
 		.pmu_enable	= arc_pmu_enable,
 		.pmu_disable	= arc_pmu_disable,
 		.event_init	= arc_pmu_event_init,