ipq40xx: update Crisis Innovation Lab MeshPoint.One BDF
[openwrt/staging/hauke.git] / target / linux / generic / backport-5.10 / 828-v6.3-of-property-fix-nvmem-cell-cells-parsing.patch
1 From ef26c0349eb5a615dab2272d08d1d5de4ac9cd4c Mon Sep 17 00:00:00 2001
2 From: Michael Walle <michael@walle.cc>
3 Date: Wed, 11 Jan 2023 00:30:56 +0100
4 Subject: [PATCH] of: property: fix #nvmem-cell-cells parsing
5
6 Commit 67b8497f005f ("of: property: make #.*-cells optional for simple
7 props") claims to make the cells-name property optional for simple
8 properties, but changed the code for the wrong property, i.e. for
9 DEFINE_SUFFIX_PROP(). Fix that.
10
11 Fixes: 67b8497f005f ("of: property: make #.*-cells optional for simple props")
12 Reported-by: Peng Fan <peng.fan@nxp.com>
13 Signed-off-by: Michael Walle <michael@walle.cc>
14 Acked-by: Rob Herring <robh@kernel.org>
15 Tested-by: Robert Marko <robimarko@gmail.com>
16 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
17 ---
18 drivers/of/property.c | 8 ++++----
19 1 file changed, 4 insertions(+), 4 deletions(-)
20
21 --- a/drivers/of/property.c
22 +++ b/drivers/of/property.c
23 @@ -1213,8 +1213,8 @@ static struct device_node *parse_prop_ce
24 if (strcmp(prop_name, list_name))
25 return NULL;
26
27 - if (of_parse_phandle_with_args(np, list_name, cells_name, index,
28 - &sup_args))
29 + if (__of_parse_phandle_with_args(np, list_name, cells_name, 0, index,
30 + &sup_args))
31 return NULL;
32
33 return sup_args.np;
34 @@ -1267,8 +1267,8 @@ static struct device_node *parse_suffix_
35 if (strcmp_suffix(prop_name, suffix))
36 return NULL;
37
38 - if (__of_parse_phandle_with_args(np, prop_name, cells_name, 0, index,
39 - &sup_args))
40 + if (of_parse_phandle_with_args(np, prop_name, cells_name, index,
41 + &sup_args))
42 return NULL;
43
44 return sup_args.np;