arm: perf: use builtin_platform_driver
authorGeliang Tang <geliangtang@gmail.com>
Wed, 23 Nov 2016 14:39:52 +0000 (22:39 +0800)
committerWill Deacon <will.deacon@arm.com>
Fri, 3 Feb 2017 18:46:42 +0000 (18:46 +0000)
Use builtin_platform_driver() helper to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/kernel/perf_event_v6.c
arch/arm/kernel/perf_event_v7.c
arch/arm/kernel/perf_event_xscale.c

index 09413e7b49aa62a47c743b8a0b4df07dbd712d0b..96b7a477a8db40b60551e03ecc6ecc3ef7fea236 100644 (file)
@@ -581,9 +581,5 @@ static struct platform_driver armv6_pmu_driver = {
        .probe          = armv6_pmu_device_probe,
 };
 
-static int __init register_armv6_pmu_driver(void)
-{
-       return platform_driver_register(&armv6_pmu_driver);
-}
-device_initcall(register_armv6_pmu_driver);
+builtin_platform_driver(armv6_pmu_driver);
 #endif /* CONFIG_CPU_V6 || CONFIG_CPU_V6K */
index b9423491b9d7208454b6cfb0c9f48a2f84de2097..ab6522b436593c59c11aa733f0ccc718b04eabf3 100644 (file)
@@ -2034,9 +2034,5 @@ static struct platform_driver armv7_pmu_driver = {
        .probe          = armv7_pmu_device_probe,
 };
 
-static int __init register_armv7_pmu_driver(void)
-{
-       return platform_driver_register(&armv7_pmu_driver);
-}
-device_initcall(register_armv7_pmu_driver);
+builtin_platform_driver(armv7_pmu_driver);
 #endif /* CONFIG_CPU_V7 */
index aa0499e2eef7b3cc4eee577b4d4cf5929b87745a..0e51f5e4f879b3a3423b183c2a75ba91a9cb9ac1 100644 (file)
@@ -767,9 +767,5 @@ static struct platform_driver xscale_pmu_driver = {
        .probe          = xscale_pmu_device_probe,
 };
 
-static int __init register_xscale_pmu_driver(void)
-{
-       return platform_driver_register(&xscale_pmu_driver);
-}
-device_initcall(register_xscale_pmu_driver);
+builtin_platform_driver(xscale_pmu_driver);
 #endif /* CONFIG_CPU_XSCALE */