arm64/cpuinfo: Move device_initcall() near cpuinfo_regs_init()
authorAnshuman Khandual <anshuman.khandual@arm.com>
Mon, 4 May 2020 12:29:37 +0000 (17:59 +0530)
committerWill Deacon <will@kernel.org>
Mon, 4 May 2020 17:08:40 +0000 (18:08 +0100)
This moves device_initcall() near cpuinfo_regs_init() making the calling
sequence clear. Besides it is a standard practice to have device_initcall()
(any __initcall for that matter) just after the function it actually calls.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/1588595377-4503-1-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/cpuinfo.c

index 8613607..a515d8f 100644 (file)
@@ -311,6 +311,8 @@ static int __init cpuinfo_regs_init(void)
        }
        return 0;
 }
+device_initcall(cpuinfo_regs_init);
+
 static void cpuinfo_detect_icache_policy(struct cpuinfo_arm64 *info)
 {
        unsigned int cpu = smp_processor_id();
@@ -403,5 +405,3 @@ void __init cpuinfo_store_boot_cpu(void)
        boot_cpu_data = *info;
        init_cpu_features(&boot_cpu_data);
 }
-
-device_initcall(cpuinfo_regs_init);