From: Krzysztof Kozlowski Date: Wed, 2 Dec 2020 19:59:55 +0000 (+0200) Subject: soc: samsung: exynos-chipid: initialize later - with arch_initcall X-Git-Tag: v5.10.237~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3e0d0dfccf88988fa9e99e86e666060f4a52bc5b;p=thirdparty%2Fkernel%2Fstable.git soc: samsung: exynos-chipid: initialize later - with arch_initcall [ Upstream commit 3b4c362e5ef102ca2d70d33f4e8cf0780053a7db ] The Exynos ChipID driver on Exynos SoCs has only informational purpose - to expose the SoC device in sysfs. No other drivers depend on it so there is really no benefit of initializing it early. Instead, initialize everything with arch_initcall which: 1. Allows to use dev_info() as the SoC bus is present (since core_initcall), 2. Could speed things up because of execution in a SMP environment (after bringing up secondary CPUs, unlike early_initcall), 3. Reduces the amount of work to be done early, when the kernel has to bring up critical devices. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201202195955.128633-2-krzk@kernel.org Stable-dep-of: c8222ef6cf29 ("soc: samsung: exynos-chipid: Add NULL pointer check in exynos_chipid_probe()") Signed-off-by: Sasha Levin --- diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index 8d4d050869068..0f2de1b016a59 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -98,9 +98,9 @@ static int __init exynos_chipid_early_init(void) goto err; } - /* it is too early to use dev_info() here (soc_dev is NULL) */ - pr_info("soc soc0: Exynos: CPU[%s] PRO_ID[0x%x] REV[0x%x] Detected\n", - soc_dev_attr->soc_id, product_id, revision); + dev_info(soc_device_to_device(soc_dev), + "Exynos: CPU[%s] PRO_ID[0x%x] REV[0x%x] Detected\n", + soc_dev_attr->soc_id, product_id, revision); return 0; @@ -110,4 +110,4 @@ err: return ret; } -early_initcall(exynos_chipid_early_init); +arch_initcall(exynos_chipid_early_init);