]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: imx: fix imx31-dt.c time-related warning
authorStephen Warren <swarren@nvidia.com>
Wed, 30 Jan 2013 03:56:17 +0000 (20:56 -0700)
committerOlof Johansson <olof@lixom.net>
Fri, 1 Feb 2013 03:55:31 +0000 (19:55 -0800)
Commit 6bb27d7 "ARM: delete struct sys_timer" caused the following:

arch/arm/mach-imx/imx31-dt.c:56:2: warning: initialization from incompatible pointer type [enabled by default]
arch/arm/mach-imx/imx31-dt.c:56:2: warning: (near initialization for ‘__mach_desc_IMX31_DT.init_time’) [enabled by default]

This is because mx31_clocks_init_dt() returns int, whereas the .init_time
field prototype expects a function returning void. Implement a wrapper so
that the prototypes match.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
arch/arm/mach-imx/imx31-dt.c

index f9a6909600972a0e0b474f0b068d9fdd3d0cd9fb..b5c04eece7805ed8ecc8a22be8829d7cf13aa884 100644 (file)
@@ -43,12 +43,17 @@ static const char *imx31_dt_board_compat[] __initdata = {
        NULL
 };
 
+static void __init imx31_dt_timer_init(void)
+{
+       mx31_clocks_init_dt();
+}
+
 DT_MACHINE_START(IMX31_DT, "Freescale i.MX31 (Device Tree Support)")
        .map_io         = mx31_map_io,
        .init_early     = imx31_init_early,
        .init_irq       = mx31_init_irq,
        .handle_irq     = imx31_handle_irq,
-       .init_time      = mx31_clocks_init_dt,
+       .init_time      = imx31_dt_timer_init,
        .init_machine   = imx31_dt_init,
        .dt_compat      = imx31_dt_board_compat,
        .restart        = mxc_restart,