diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-04-18 17:41:02 +0900 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-06-19 11:18:50 -0400 |
commit | f89d482fe5a95db637190cd49e1954588995d881 (patch) | |
tree | 22a68364e29daca854fd8b593b7fd0046cc3fac3 | |
parent | 972f2a8905a1ca3fc25401e60a9a1d7f6a7ab898 (diff) | |
download | u-boot-imx-f89d482fe5a95db637190cd49e1954588995d881.zip u-boot-imx-f89d482fe5a95db637190cd49e1954588995d881.tar.gz u-boot-imx-f89d482fe5a95db637190cd49e1954588995d881.tar.bz2 |
fdt_support: add 'const' qualifier for unchanged argument
In the next commit, I will add a new function, fdt_pack_reg()
which uses get_cells_len().
Beforehand, this commit adds 'const' qualifier to get_cells_len().
Otherwise, a warning message will appear:
warning: passing argument 1 of 'get_cells_len' discards 'const'
qualifier from pointer target type [enabled by default]
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | common/fdt_support.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c index 9a9151a..fe85a8b 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -21,11 +21,11 @@ * if #NNNN-cells property is 2 then len is 8 * otherwise len is 4 */ -static int get_cells_len(void *blob, char *nr_cells_name) +static int get_cells_len(const void *fdt, const char *nr_cells_name) { const fdt32_t *cell; - cell = fdt_getprop(blob, 0, nr_cells_name, NULL); + cell = fdt_getprop(fdt, 0, nr_cells_name, NULL); if (cell && fdt32_to_cpu(*cell) == 2) return 8; |