mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
iommu/qcom: Simplify with scoped for each OF child loop
Use scoped for-each loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
f91879fdf7
commit
2026159372
|
|
@ -761,14 +761,10 @@ static struct platform_driver qcom_iommu_ctx_driver = {
|
|||
|
||||
static bool qcom_iommu_has_secure_context(struct qcom_iommu_dev *qcom_iommu)
|
||||
{
|
||||
struct device_node *child;
|
||||
|
||||
for_each_child_of_node(qcom_iommu->dev->of_node, child) {
|
||||
for_each_child_of_node_scoped(qcom_iommu->dev->of_node, child) {
|
||||
if (of_device_is_compatible(child, "qcom,msm-iommu-v1-sec") ||
|
||||
of_device_is_compatible(child, "qcom,msm-iommu-v2-sec")) {
|
||||
of_node_put(child);
|
||||
of_device_is_compatible(child, "qcom,msm-iommu-v2-sec"))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user