iommu: pass cell_count = -1 to of_for_each_phandle with cells_name
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sat, 24 Aug 2019 13:28:45 +0000 (15:28 +0200)
committerRob Herring <robh@kernel.org>
Fri, 13 Sep 2019 21:54:23 +0000 (16:54 -0500)
commitc680e9abaade9145ef195f9b28afa1a3b975438b
tree6c68dfb9e46ca1c6e19c5c6633c0db20d1ab1ef2
parent693af5f3eeaa46115c44f1d639dea4a8d8342a4b
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>
drivers/iommu/arm-smmu.c
drivers/iommu/mtk_iommu_v1.c