aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/perf_event_cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/perf_event_cpu.c')
-rw-r--r--arch/arm/kernel/perf_event_cpu.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c
index 02244faa539..71c824ce020 100644
--- a/arch/arm/kernel/perf_event_cpu.c
+++ b/arch/arm/kernel/perf_event_cpu.c
@@ -285,7 +285,6 @@ static int __devinit cpu_pmu_device_probe(struct platform_device *pdev)
285 cpu_pmu = pmu; 285 cpu_pmu = pmu;
286 cpu_pmu->plat_device = pdev; 286 cpu_pmu->plat_device = pdev;
287 cpu_pmu_init(cpu_pmu); 287 cpu_pmu_init(cpu_pmu);
288 register_cpu_notifier(&cpu_pmu_hotplug_notifier);
289 armpmu_register(cpu_pmu, cpu_pmu->name, PERF_TYPE_RAW); 288 armpmu_register(cpu_pmu, cpu_pmu->name, PERF_TYPE_RAW);
290 289
291 return 0; 290 return 0;
@@ -303,6 +302,16 @@ static struct platform_driver cpu_pmu_driver = {
303 302
304static int __init register_pmu_driver(void) 303static int __init register_pmu_driver(void)
305{ 304{
306 return platform_driver_register(&cpu_pmu_driver); 305 int err;
306
307 err = register_cpu_notifier(&cpu_pmu_hotplug_notifier);
308 if (err)
309 return err;
310
311 err = platform_driver_register(&cpu_pmu_driver);
312 if (err)
313 unregister_cpu_notifier(&cpu_pmu_hotplug_notifier);
314
315 return err;
307} 316}
308device_initcall(register_pmu_driver); 317device_initcall(register_pmu_driver);