aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/arm-smmu.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2019-08-24 15:28:45 +0200
committerRob Herring <robh@kernel.org>2019-09-13 16:54:23 -0500
commitc680e9abaade9145ef195f9b28afa1a3b975438b (patch)
tree6c68dfb9e46ca1c6e19c5c6633c0db20d1ab1ef2 /drivers/iommu/arm-smmu.c
parentdt-bindings: arm: Convert Realtek board/soc bindings to json-schema (diff)
downloadlinux-dev-c680e9abaade9145ef195f9b28afa1a3b975438b.tar.xz
linux-dev-c680e9abaade9145ef195f9b28afa1a3b975438b.zip
iommu: pass cell_count = -1 to of_for_each_phandle with cells_name
Currently of_for_each_phandle ignores the cell_count parameter when a cells_name is given. I intend to change that and let the iterator fall back to a non-negative cell_count if the cells_name property is missing in the referenced node. To not change how existing of_for_each_phandle's users iterate, fix them to pass cell_count = -1 when also cells_name is given which yields the expected behaviour with and without my change. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/iommu/arm-smmu.c')
-rw-r--r--drivers/iommu/arm-smmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 64977c131ee6..81b7734654b3 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -333,7 +333,7 @@ static int __find_legacy_master_phandle(struct device *dev, void *data)
int err;
of_for_each_phandle(it, err, dev->of_node, "mmu-masters",
- "#stream-id-cells", 0)
+ "#stream-id-cells", -1)
if (it->node == np) {
*(void **)data = dev;
return 1;