Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

of/platform: Fix sparc:allmodconfig build

sparc:allmodconfig fails to build with:

drivers/built-in.o: In function `platform_bus_init':
(.init.text+0x3684): undefined reference to `of_platform_register_reconfig_notifier'

of_platform_register_reconfig_notifier is only declared if both OF_ADDRESS
and OF_DYNAMIC are configured. Yet, the include file only declares a dummy
function if OF_DYNAMIC is not configured. The sparc architecture does not
configure OF_ADDRESS, but does configure OF_DYNAMIC, causing above error.

Fixes: 801d728c10db ("of/reconfig: Add OF_DYNAMIC notifier for platform_bus_type")
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Guenter Roeck and committed by
Rob Herring
a697c2ef 8cbba1ab

+1 -1
+1 -1
include/linux/of_platform.h
··· 84 84 static inline void of_platform_depopulate(struct device *parent) { } 85 85 #endif 86 86 87 - #ifdef CONFIG_OF_DYNAMIC 87 + #if defined(CONFIG_OF_DYNAMIC) && defined(CONFIG_OF_ADDRESS) 88 88 extern void of_platform_register_reconfig_notifier(void); 89 89 #else 90 90 static inline void of_platform_register_reconfig_notifier(void) { }