diff options
author | Junhao He <hejunhao3@huawei.com> | 2023-01-19 13:03:06 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2023-01-19 21:30:21 +0300 |
commit | 053b5579dacfc5763dda0c073ee14147421d32d7 (patch) | |
tree | dec7e3095a52eae0fb80112b336442855ded3a2e /drivers/perf/hisilicon/hisi_uncore_pmu.c | |
parent | 7f95da9d2dc4c20bb374c281ceb8fa40b6208f4b (diff) | |
download | linux-053b5579dacfc5763dda0c073ee14147421d32d7.tar.xz |
drivers/perf: hisi: Simplify the parameters of hisi_pmu_init()
Use "hisi_pmu" to simplify the parameter list for the hisi_pmu_init()
function.
Signed-off-by: Junhao He <hejunhao3@huawei.com>
Link: https://lore.kernel.org/r/20230119100307.3660-3-hejunhao3@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf/hisilicon/hisi_uncore_pmu.c')
-rw-r--r-- | drivers/perf/hisilicon/hisi_uncore_pmu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.c b/drivers/perf/hisilicon/hisi_uncore_pmu.c index 2a466477920b..f1b0f5e1a28f 100644 --- a/drivers/perf/hisilicon/hisi_uncore_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_pmu.c @@ -531,9 +531,11 @@ int hisi_uncore_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node) } EXPORT_SYMBOL_GPL(hisi_uncore_pmu_offline_cpu); -void hisi_pmu_init(struct pmu *pmu, const char *name, - const struct attribute_group **attr_groups, struct module *module) +void hisi_pmu_init(struct hisi_pmu *hisi_pmu, const char *name, + struct module *module) { + struct pmu *pmu = &hisi_pmu->pmu; + pmu->name = name; pmu->module = module; pmu->task_ctx_nr = perf_invalid_context; @@ -545,7 +547,7 @@ void hisi_pmu_init(struct pmu *pmu, const char *name, pmu->start = hisi_uncore_pmu_start; pmu->stop = hisi_uncore_pmu_stop; pmu->read = hisi_uncore_pmu_read; - pmu->attr_groups = attr_groups; + pmu->attr_groups = hisi_pmu->pmu_events.attr_groups; pmu->capabilities = PERF_PMU_CAP_NO_EXCLUDE; } EXPORT_SYMBOL_GPL(hisi_pmu_init); |