Skip to content

Commit a697c2e

Browse files
groeckrobherring
authored andcommitted
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: 801d728 ("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>
1 parent 8cbba1a commit a697c2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/of_platform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static inline int of_platform_populate(struct device_node *root,
8484
static inline void of_platform_depopulate(struct device *parent) { }
8585
#endif
8686

87-
#ifdef CONFIG_OF_DYNAMIC
87+
#if defined(CONFIG_OF_DYNAMIC) && defined(CONFIG_OF_ADDRESS)
8888
extern void of_platform_register_reconfig_notifier(void);
8989
#else
9090
static inline void of_platform_register_reconfig_notifier(void) { }

0 commit comments

Comments
 (0)