From c392f56c946033bd136043079a62b9188888828d Mon Sep 17 00:00:00 2001 From: Jiang Liu Date: Wed, 7 Jan 2015 15:31:40 +0800 Subject: iommu/irq_remapping: Kill function irq_remapping_supported() and related code Simplify irq_remapping code by killing irq_remapping_supported() and related interfaces. Joerg posted a similar patch at https://lkml.org/lkml/2014/12/15/490, so assume an signed-off from Joerg. Signed-off-by: Jiang Liu Signed-off-by: Joerg Roedel Tested-by: Joerg Roedel Cc: Tony Luck Cc: iommu@lists.linux-foundation.org Cc: H. Peter Anvin Cc: Benjamin Herrenschmidt Cc: Yinghai Lu Cc: Borislav Petkov Cc: David Rientjes Cc: HATAYAMA Daisuke Cc: Jan Beulich Cc: Richard Weinberger Cc: Oren Twaig Link: http://lkml.kernel.org/r/1420615903-28253-14-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner --- drivers/iommu/irq_remapping.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'drivers/iommu/irq_remapping.c') diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c index 91d5884d3ed9..e7449b42504d 100644 --- a/drivers/iommu/irq_remapping.c +++ b/drivers/iommu/irq_remapping.c @@ -199,19 +199,11 @@ void set_irq_remapping_broken(void) irq_remap_broken = 1; } -int irq_remapping_supported(void) +int __init irq_remapping_prepare(void) { if (disable_irq_remap) - return 0; - - if (!remap_ops || !remap_ops->supported) - return 0; + return -ENOSYS; - return remap_ops->supported(); -} - -int __init irq_remapping_prepare(void) -{ remap_ops = &intel_irq_remap_ops; #ifdef CONFIG_AMD_IOMMU -- cgit v1.2.3