]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: ti: fdt_ops: make ti_set_fdt_env() const-correct
authorBhimeswararao Matsa <bhimeswararao.matsa@gmail.com>
Mon, 1 Sep 2025 14:39:45 +0000 (20:09 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 11 Sep 2025 19:14:17 +0000 (13:14 -0600)
Make the fdt_map parameter a pointer to const, since the function only
reads the mapping table. This improves API correctness and allows maps
to live in read-only data.

No functional change intended

Signed-off-by: Bhimeswararao Matsa <bhimeswararao.matsa@gmail.com>
board/ti/common/fdt_ops.c
board/ti/common/fdt_ops.h

index 47df5726ff05b9e8c8cc56e674f23a4b948bb5e5..0486d2e780210d019c5c51b6aa25c58ad6e74663 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include "fdt_ops.h"
 
-void ti_set_fdt_env(const char *board_name, struct ti_fdt_map *fdt_map)
+void ti_set_fdt_env(const char *board_name, const struct ti_fdt_map *fdt_map)
 {
        char *fdt_file_name = NULL;
        char fdtfile[TI_FDT_FILE_MAX];
index 5d304994fb6e5160e2aa058b0161d924e2a3537f..5375303ba8e05269206c36e0da8deca1b9235d08 100644 (file)
@@ -37,6 +37,6 @@ struct ti_fdt_map {
  * @board_name: match to search with (max of TI_BOARD_NAME_MAX chars)
  * @fdt_map: NULL terminated array of device tree file name matches.
  */
-void ti_set_fdt_env(const char *board_name, struct ti_fdt_map *fdt_map);
+void ti_set_fdt_env(const char *board_name, const struct ti_fdt_map *fdt_map);
 
 #endif /* __FDT_OPS_H */