ARM: imx: reset_controller may be disabled
authorArnd Bergmann <arnd@arndb.de>
Tue, 30 Apr 2013 12:58:31 +0000 (14:58 +0200)
committerArnd Bergmann <arnd@arndb.de>
Thu, 2 May 2013 19:50:06 +0000 (21:50 +0200)
The new reset controller API is optional, so if that is disabled,
we must not call it from platform code.

arch/arm/mach-imx/built-in.o: In function
 `imx_src_init': /git/arm-soc/arch/arm/mach-imx/src.c:144:
undefined reference to `reset_controller_register'

Cc: Sascha Hauer <kernel@pengutronix.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-imx/src.c

index dec6411..4e0236c 100644 (file)
@@ -138,7 +138,8 @@ void __init imx_src_init(void)
        WARN_ON(!src_base);
 
        imx_reset_controller.of_node = np;
-       reset_controller_register(&imx_reset_controller);
+       if (IS_ENABLED(CONFIG_RESET_CONTROLLER))
+               reset_controller_register(&imx_reset_controller);
 
        /*
         * force warm reset sources to generate cold reset