void of_iommu_set_ops(struct device_node *np, struct iommu_ops *ops) { struct of_iommu_node *iommu = kzalloc(sizeof(*iommu), GFP_KERNEL);
if (WARN_ON(!iommu)) return;
INIT_LIST_HEAD(&iommu->list); iommu->np = np; iommu->ops = ops; spin_lock(&of_iommu_lock); list_add_tail(&iommu->list, &of_iommu_list); spin_unlock(&of_iommu_lock);
}