[PATCH 10/32] perf/xgene: Assign parents for event_source devices
From: Jonathan Cameron
Date: Tue Apr 04 2023 - 09:47:58 EST
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 hardware related struct device.
Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@xxxxxxxxx/
Cc: Khuong Dinh <khuong@xxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
---
drivers/perf/xgene_pmu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/perf/xgene_pmu.c b/drivers/perf/xgene_pmu.c
index 0c32dffc7ede..451c01dbc1d6 100644
--- a/drivers/perf/xgene_pmu.c
+++ b/drivers/perf/xgene_pmu.c
@@ -1104,6 +1104,7 @@ static int xgene_init_perf(struct xgene_pmu_dev *pmu_dev, char *name)
/* Perf driver registration */
pmu_dev->pmu = (struct pmu) {
+ .parent = pmu_dev->parent->dev,
.attr_groups = pmu_dev->attr_groups,
.task_ctx_nr = perf_invalid_context,
.pmu_enable = xgene_perf_pmu_enable,
--
2.37.2