]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: stm32mp1: use IS_ENABLED to prevent ifdef in ft_board_setup
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 31 Jul 2020 14:31:50 +0000 (16:31 +0200)
committerPatrice Chotard <patrice.chotard@st.com>
Thu, 13 Aug 2020 07:52:49 +0000 (09:52 +0200)
Use IS_ENABLED to prevent ifdef in ft_board_setup.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
board/st/stm32mp1/stm32mp1.c

index 08d18b6da8829e4aa37bd917a1ec5f4833670bd8..4d26738a24de563b6760bfac95572a0f7f3bdd31 100644 (file)
@@ -842,14 +842,14 @@ int mmc_get_env_dev(void)
 #if defined(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
-#ifdef CONFIG_FDT_FIXUP_PARTITIONS
        struct node_info nodes[] = {
                { "st,stm32f469-qspi",          MTD_DEV_TYPE_NOR,  },
                { "st,stm32f469-qspi",          MTD_DEV_TYPE_SPINAND},
                { "st,stm32mp15-fmc2",          MTD_DEV_TYPE_NAND, },
        };
-       fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
-#endif
+
+       if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
+               fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
 
        return 0;
 }