From: Laurent Pinchart Date: Fri, 4 Aug 2017 22:43:45 +0000 (+0300) Subject: ARM: OMAP2+: Register SoC device attributes from machine .init() X-Git-Tag: android-x86-8.1-r1~2641^2~16^2~54 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=07e72f9a3f01b370be59ef2cf3ae13e47f696d71;p=android-x86%2Fkernel.git ARM: OMAP2+: Register SoC device attributes from machine .init() SoC device attributes are registered with a call to soc_device_register() from the machine .init_late() operation, which is called from the late initcall, after all drivers built-in drivers have been probed. This results in the impossibility for drivers to use SoC device matching in their probe function. The omap_soc_device_init() function is safe to call from the machine .init() operation, as all data it depends on is initialized from the .init_early() operation. Move SoC device attribute registration to machine .init() like on all other ARM platforms. Signed-off-by: Laurent Pinchart Acked-by: Tony Lindgren Signed-off-by: Tomi Valkeinen --- diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index b1e661bb5521..583fc39d84cd 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -33,6 +33,7 @@ static void __init __maybe_unused omap_generic_init(void) pdata_quirks_init(omap_dt_match_table); omapdss_init_of(); + omap_soc_device_init(); } #ifdef CONFIG_SOC_OMAP2420 diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 1cd20e4d56b0..cb5d7314cf99 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -428,7 +428,6 @@ static void __init __maybe_unused omap_hwmod_init_postsetup(void) static void __init __maybe_unused omap_common_late_init(void) { omap2_common_pm_late_init(); - omap_soc_device_init(); } #ifdef CONFIG_SOC_OMAP2420