aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2012-09-21 09:23:47 -0400
committerWill Deacon <will.deacon@arm.com>2012-11-09 06:37:26 -0500
commit0305230a3d92d6829db89c9e0c096d4d8733f317 (patch)
tree30720e24df940feccf3e8fc03ddfb65d08751f83
parent288700d16d4c1479aa00e3db13caed8bb7c83e9f (diff)
ARM: perf: consistently use arm_pmu->name for PMU name
Perf has three ways to name a PMU: either by passing an explicit char *, reading arm_pmu->name or accessing arm_pmu->pmu.name. Just use arm_pmu->name consistently in the ARM backend. Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arch/arm/include/asm/pmu.h2
-rw-r--r--arch/arm/kernel/perf_event.c4
-rw-r--r--arch/arm/kernel/perf_event_cpu.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h
index a209a384dbc..f24edad26c7 100644
--- a/arch/arm/include/asm/pmu.h
+++ b/arch/arm/include/asm/pmu.h
@@ -93,7 +93,7 @@ struct arm_pmu {
93 93
94extern const struct dev_pm_ops armpmu_dev_pm_ops; 94extern const struct dev_pm_ops armpmu_dev_pm_ops;
95 95
96int armpmu_register(struct arm_pmu *armpmu, char *name, int type); 96int armpmu_register(struct arm_pmu *armpmu, int type);
97 97
98u64 armpmu_event_update(struct perf_event *event); 98u64 armpmu_event_update(struct perf_event *event);
99 99
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c
index 1cfa3f35713..1243deda5bb 100644
--- a/arch/arm/kernel/perf_event.c
+++ b/arch/arm/kernel/perf_event.c
@@ -511,12 +511,12 @@ static void __init armpmu_init(struct arm_pmu *armpmu)
511 }; 511 };
512} 512}
513 513
514int armpmu_register(struct arm_pmu *armpmu, char *name, int type) 514int armpmu_register(struct arm_pmu *armpmu, int type)
515{ 515{
516 armpmu_init(armpmu); 516 armpmu_init(armpmu);
517 pr_info("enabled with %s PMU driver, %d counters available\n", 517 pr_info("enabled with %s PMU driver, %d counters available\n",
518 armpmu->name, armpmu->num_events); 518 armpmu->name, armpmu->num_events);
519 return perf_pmu_register(&armpmu->pmu, name, type); 519 return perf_pmu_register(&armpmu->pmu, armpmu->name, type);
520} 520}
521 521
522/* 522/*
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c
index db9c6b530f3..9a4f6307a01 100644
--- a/arch/arm/kernel/perf_event_cpu.c
+++ b/arch/arm/kernel/perf_event_cpu.c
@@ -46,7 +46,7 @@ const char *perf_pmu_name(void)
46 if (!cpu_pmu) 46 if (!cpu_pmu)
47 return NULL; 47 return NULL;
48 48
49 return cpu_pmu->pmu.name; 49 return cpu_pmu->name;
50} 50}
51EXPORT_SYMBOL_GPL(perf_pmu_name); 51EXPORT_SYMBOL_GPL(perf_pmu_name);
52 52
@@ -287,7 +287,7 @@ static int __devinit cpu_pmu_device_probe(struct platform_device *pdev)
287 cpu_pmu = pmu; 287 cpu_pmu = pmu;
288 cpu_pmu->plat_device = pdev; 288 cpu_pmu->plat_device = pdev;
289 cpu_pmu_init(cpu_pmu); 289 cpu_pmu_init(cpu_pmu);
290 armpmu_register(cpu_pmu, cpu_pmu->name, PERF_TYPE_RAW); 290 armpmu_register(cpu_pmu, PERF_TYPE_RAW);
291 291
292 return 0; 292 return 0;
293} 293}