diff options
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/irq_remapping.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c index 89c4846683be..91d5884d3ed9 100644 --- a/drivers/iommu/irq_remapping.c +++ b/drivers/iommu/irq_remapping.c @@ -194,16 +194,6 @@ static __init int setup_irqremap(char *str) } early_param("intremap", setup_irqremap); -void __init setup_irq_remapping_ops(void) -{ - remap_ops = &intel_irq_remap_ops; - -#ifdef CONFIG_AMD_IOMMU - if (amd_iommu_irq_ops.prepare() == 0) - remap_ops = &amd_iommu_irq_ops; -#endif -} - void set_irq_remapping_broken(void) { irq_remap_broken = 1; @@ -222,9 +212,14 @@ int irq_remapping_supported(void) int __init irq_remapping_prepare(void) { - if (!remap_ops || !remap_ops->prepare) - return -ENODEV; + remap_ops = &intel_irq_remap_ops; +#ifdef CONFIG_AMD_IOMMU + if (amd_iommu_irq_ops.prepare() == 0) { + remap_ops = &amd_iommu_irq_ops; + return 0; + } +#endif return remap_ops->prepare(); } |