board: constify struct node_info array
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 19 Jul 2018 07:28:23 +0000 (16:28 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 24 Jul 2018 23:47:52 +0000 (08:47 +0900)
Add 'const' (also 'static' in some places) to struct node_info
arrays to save memory footprint.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
board/CarMediaLab/flea3/flea3.c
board/compulab/cm_fx6/cm_fx6.c
board/freescale/bsc9131rdb/bsc9131rdb.c
board/freescale/bsc9132qds/bsc9132qds.c
board/gateworks/gw_ventana/gw_ventana.c
board/isee/igep003x/board.c
board/isee/igep00x0/igep00x0.c
board/toradex/colibri_imx7/colibri_imx7.c
board/toradex/colibri_vf/colibri_vf.c

index c0f33b806ee9282a8ee5920db64e85ebec45c2ba..9eec1b7838123e54529bf25a0663d140d91211e8 100644 (file)
@@ -205,7 +205,7 @@ u32 get_board_rev(void)
  */
 int ft_board_setup(void *blob, bd_t *bd)
 {
-       struct node_info nodes[] = {
+       static const struct node_info nodes[] = {
                { "physmap-flash.0", MTD_DEV_TYPE_NOR, },  /* NOR flash */
                { "mxc_nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */
        };
index c114cdccbb59efda21bbeb26be2ac68b949ac78e..d42f57d4b7014b3bd6550af186504f2c580585d2 100644 (file)
@@ -519,7 +519,7 @@ int cm_fx6_setup_ecspi(void) { return 0; }
 #ifdef CONFIG_OF_BOARD_SETUP
 #define USDHC3_PATH    "/soc/aips-bus@02100000/usdhc@02198000/"
 
-struct node_info nodes[] = {
+static const struct node_info nodes[] = {
        /*
         * Both entries target the same flash chip. The st,m25p compatible
         * is used in the vendor device trees, while upstream uses (the
index 367152fa5f0af44dcc422320d7cc333ab3862240..9d9c83f7167e8bca4cafef6bc11dc24e13216cbf 100644 (file)
@@ -53,7 +53,7 @@ int checkboard(void)
 
 #if defined(CONFIG_OF_BOARD_SETUP)
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
-struct node_info nodes[] = {
+static const struct node_info nodes[] = {
        { "fsl,ifc-nand",               MTD_DEV_TYPE_NAND, },
 };
 #endif
index 6885668ff93a2cf1e6033f72afbe007eeba14d9a..36a55285e8110a8a871a1fafe41896279e66a05e 100644 (file)
@@ -357,7 +357,7 @@ void fdt_del_node_compat(void *blob, const char *compatible)
 
 #if defined(CONFIG_OF_BOARD_SETUP)
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
-struct node_info nodes[] = {
+static const struct node_info nodes[] = {
        { "cfi-flash",                  MTD_DEV_TYPE_NOR,  },
        { "fsl,ifc-nand",               MTD_DEV_TYPE_NAND, },
 };
index b86924ebe2c7215621c923e1dc53b648fdd56b4f..c4ec97435f4e7a44a68b1235dc9a6f4958749f78 100644 (file)
@@ -1114,7 +1114,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 {
        struct ventana_board_info *info = &ventana_info;
        struct ventana_eeprom_config *cfg;
-       struct node_info nodes[] = {
+       static const struct node_info nodes[] = {
                { "sst,w25q256",          MTD_DEV_TYPE_NOR, },  /* SPI flash */
                { "fsl,imx6q-gpmi-nand",  MTD_DEV_TYPE_NAND, }, /* NAND flash */
        };
index cc55bcc81adfc636f06587d436f02061dce41b31..965a009a9f53311baebc945c11e7624c2a355ad5 100644 (file)
@@ -211,7 +211,7 @@ int board_late_init(void)
 int ft_board_setup(void *blob, bd_t *bd)
 {
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
-       static struct node_info nodes[] = {
+       static const struct node_info nodes[] = {
                { "ti,omap2-nand", MTD_DEV_TYPE_NAND, },
        };
 
index 45a414c153abb2fceade1af7c15e9648537b525c..367af82d4a16a59deeae7bd509ffda35f2b45592 100644 (file)
@@ -157,7 +157,7 @@ static int ft_enable_by_compatible(void *blob, char *compat, int enable)
 int ft_board_setup(void *blob, bd_t *bd)
 {
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
-       static struct node_info nodes[] = {
+       static const struct node_info nodes[] = {
                { "ti,omap2-nand", MTD_DEV_TYPE_NAND, },
                { "ti,omap2-onenand", MTD_DEV_TYPE_ONENAND, },
        };
index f9f488db1ceb60bb06e2a63407fbec0b3d53f618..2210095d7a5c20aecce71413e1367d9128fac74e 100644 (file)
@@ -389,7 +389,7 @@ int checkboard(void)
 int ft_board_setup(void *blob, bd_t *bd)
 {
 #if defined(CONFIG_FDT_FIXUP_PARTITIONS)
-       static struct node_info nodes[] = {
+       static const struct node_info nodes[] = {
                { "fsl,imx7d-gpmi-nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */
                { "fsl,imx6q-gpmi-nand", MTD_DEV_TYPE_NAND, },
        };
index 83c35030077674b86949108f655f2d1bdfa95b99..4db1757469f8053e376e00427c667050bcb92671 100644 (file)
@@ -580,7 +580,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 {
        int ret = 0;
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
-       static struct node_info nodes[] = {
+       static const struct node_info nodes[] = {
                { "fsl,vf610-nfc", MTD_DEV_TYPE_NAND, }, /* NAND flash */
        };