kernel: backport NVMEM patches queued for the v6.4
[openwrt/staging/dedeckeh.git] / target / linux / generic / backport-5.10 / 825-v5.15-of-unify-of_count_phandle_with_args-arguments-with-C.patch
1 From a065d5615fc83908ef21ed8159ffb63d816ff5de Mon Sep 17 00:00:00 2001
2 From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
3 Date: Wed, 28 Jul 2021 16:42:27 +0200
4 Subject: [PATCH] of: unify of_count_phandle_with_args() arguments with
5 !CONFIG_OF
6
7 Unify the declaration of of_count_phandle_with_args() between enabled
8 and disabled OF by making constifying pointed device_node.
9
10 Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11 Reviewed-by: Rob Herring <robh@kernel.org>
12 Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
13 ---
14 include/linux/of.h | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17 --- a/include/linux/of.h
18 +++ b/include/linux/of.h
19 @@ -889,7 +889,7 @@ static inline int of_parse_phandle_with_
20 return -ENOSYS;
21 }
22
23 -static inline int of_count_phandle_with_args(struct device_node *np,
24 +static inline int of_count_phandle_with_args(const struct device_node *np,
25 const char *list_name,
26 const char *cells_name)
27 {