aboutsummaryrefslogtreecommitdiff
path: root/drivers/core/of_addr.c
diff options
context:
space:
mode:
authorBin Meng2021-04-30 21:16:59 +0800
committerSimon Glass2021-06-05 07:35:34 -0600
commit0e35b937b9c46f313a38aa7d4aba88be76d8abf7 (patch)
tree137d750fb9d6d42e7f143fe610309562a2e84495 /drivers/core/of_addr.c
parent139eaa7a2b5f25e42307a672849eba0e5b4cddf0 (diff)
of: addr: Remove call to dev_count_cells() in of_get_address()
In of_get_address(), there is: dev_count_cells(dev, &na, &ns); followed by: bus->count_cells(dev, &na, &ns); but no codes in between use na/ns, hence the first call is useless. By dropping the first call, dev_count_cells() is now useless too. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/of_addr.c')
-rw-r--r--drivers/core/of_addr.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/core/of_addr.c b/drivers/core/of_addr.c
index a3af48fd885..3fbc0a7afa6 100644
--- a/drivers/core/of_addr.c
+++ b/drivers/core/of_addr.c
@@ -118,11 +118,6 @@ static struct of_bus *of_match_bus(struct device_node *np)
return NULL;
}
-static void dev_count_cells(const struct device_node *np, int *nap, int *nsp)
-{
- of_bus_default_count_cells(np, nap, nsp);
-}
-
const __be32 *of_get_address(const struct device_node *dev, int index,
u64 *size, unsigned int *flags)
{
@@ -136,7 +131,6 @@ const __be32 *of_get_address(const struct device_node *dev, int index,
parent = of_get_parent(dev);
if (parent == NULL)
return NULL;
- dev_count_cells(dev, &na, &ns);
bus = of_match_bus(parent);
bus->count_cells(dev, &na, &ns);
of_node_put(parent);