提交 032329ee 编写于 作者: J Jiang Liu 提交者: Thomas Gleixner

x86, acpi, irq: Kill static function irq_to_gsi()

Static function irq_to_gsi() is only called by acpi_isa_irq_to_gsi(),
so kill function irq_to_gsi() and simplify acpi_isa_irq_to_gsi().
Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Len Brown <len.brown@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Link: http://lkml.kernel.org/r/1402302011-23642-7-git-send-email-jiang.liu@linux.intel.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 965cd0e4
...@@ -120,22 +120,6 @@ static unsigned int gsi_to_irq(unsigned int gsi) ...@@ -120,22 +120,6 @@ static unsigned int gsi_to_irq(unsigned int gsi)
return irq; return irq;
} }
static u32 irq_to_gsi(int irq)
{
unsigned int gsi;
if (irq < NR_IRQS_LEGACY)
gsi = isa_irq_to_gsi[irq];
else if (irq < gsi_top)
gsi = irq;
else if (irq < (gsi_top + NR_IRQS_LEGACY))
gsi = irq - gsi_top;
else
gsi = 0xffffffff;
return gsi;
}
/* /*
* This is just a simple wrapper around early_ioremap(), * This is just a simple wrapper around early_ioremap(),
* with sanity checks for phys == 0 and size == 0. * with sanity checks for phys == 0 and size == 0.
...@@ -640,10 +624,12 @@ EXPORT_SYMBOL_GPL(acpi_gsi_to_irq); ...@@ -640,10 +624,12 @@ EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);
int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi) int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi)
{ {
if (isa_irq >= 16) if (isa_irq < NR_IRQS_LEGACY) {
return -1; *gsi = isa_irq_to_gsi[isa_irq];
*gsi = irq_to_gsi(isa_irq);
return 0; return 0;
}
return -1;
} }
static int acpi_register_gsi_pic(struct device *dev, u32 gsi, static int acpi_register_gsi_pic(struct device *dev, u32 gsi,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册