ARM: perf: consistently use arm_pmu->name for PMU name
authorWill Deacon <will.deacon@arm.com>
Fri, 21 Sep 2012 13:23:47 +0000 (14:23 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 9 Nov 2012 11:37:26 +0000 (11:37 +0000)
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>
arch/arm/include/asm/pmu.h
arch/arm/kernel/perf_event.c
arch/arm/kernel/perf_event_cpu.c

index a209a384dbc9384462abc364ba25e0ca86f1ec14..f24edad26c70fd34fb9182179ae87618bbb72da8 100644 (file)
@@ -93,7 +93,7 @@ struct arm_pmu {
 
 extern const struct dev_pm_ops armpmu_dev_pm_ops;
 
-int armpmu_register(struct arm_pmu *armpmu, char *name, int type);
+int armpmu_register(struct arm_pmu *armpmu, int type);
 
 u64 armpmu_event_update(struct perf_event *event);
 
index 1cfa3f35713e984ba92abf879dc6b9ae2feec66a..1243deda5bbbbf7874c6ff883b6f7f400c526308 100644 (file)
@@ -511,12 +511,12 @@ static void __init armpmu_init(struct arm_pmu *armpmu)
        };
 }
 
-int armpmu_register(struct arm_pmu *armpmu, char *name, int type)
+int armpmu_register(struct arm_pmu *armpmu, int type)
 {
        armpmu_init(armpmu);
        pr_info("enabled with %s PMU driver, %d counters available\n",
                        armpmu->name, armpmu->num_events);
-       return perf_pmu_register(&armpmu->pmu, name, type);
+       return perf_pmu_register(&armpmu->pmu, armpmu->name, type);
 }
 
 /*
index db9c6b530f3c8c9e02c77311bafa7c7c538d2fc6..9a4f6307a01620996f08c29ebec7c03d05ff05fd 100644 (file)
@@ -46,7 +46,7 @@ const char *perf_pmu_name(void)
        if (!cpu_pmu)
                return NULL;
 
-       return cpu_pmu->pmu.name;
+       return cpu_pmu->name;
 }
 EXPORT_SYMBOL_GPL(perf_pmu_name);
 
@@ -287,7 +287,7 @@ static int __devinit cpu_pmu_device_probe(struct platform_device *pdev)
        cpu_pmu = pmu;
        cpu_pmu->plat_device = pdev;
        cpu_pmu_init(cpu_pmu);
-       armpmu_register(cpu_pmu, cpu_pmu->name, PERF_TYPE_RAW);
+       armpmu_register(cpu_pmu, PERF_TYPE_RAW);
 
        return 0;
 }