参照元†
- struct notifier_block *nb
- unsigned long action
- void *data
返り値†
static int __iommu_attach_notifier(struct notifier_block *nb,
unsigned long action, void *data)
{
struct iommu_dma_notifier_data *master, *tmp;
if (action != BUS_NOTIFY_ADD_DEVICE)
return 0;
mutex_lock(&iommu_dma_notifier_lock);
list_for_each_entry_safe(master, tmp, &iommu_dma_masters, list) {
if (do_iommu_attach(master->dev, master->ops,
master->dma_base, master->size)) {
list_del(&master->list);
kfree(master);
}
}
mutex_unlock(&iommu_dma_notifier_lock);
return 0;
}
コメント†