struct iommu_ops *of_iommu_get_ops(struct device_node *np) { struct of_iommu_node *node; struct iommu_ops *ops = NULL;
spin_lock(&of_iommu_lock); list_for_each_entry(node, &of_iommu_list, list) if (node->np == np) { ops = node->ops; break; } spin_unlock(&of_iommu_lock);
return ops; }