summaryrefslogtreecommitdiffstats
path: root/drivers/pci/htirq.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-05-07 15:44:08 +0000
committerThomas Gleixner <tglx@linutronix.de>2014-05-16 14:05:19 +0200
commit59b47ddc0b4d7ea8a625512e802832730c1feeb4 (patch)
treeeefb05672b47e7361724f55e8f26cd7f6ae71e88 /drivers/pci/htirq.c
parent0a2db49dc4fe2873f857617d320c37b6bfe40255 (diff)
x86: htirq: Use irq_alloc/free_irq()
No functional change, just cleaned up a bit. This does not replace the requirement to move x86 to irq domains, but it limits the mess to some degree. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Grant Likely <grant.likely@linaro.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Cc: x86@kernel.org Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/20140507154335.452206351@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/pci/htirq.c')
-rw-r--r--drivers/pci/htirq.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c
index 6e373ea57b3..d68b030ab53 100644
--- a/drivers/pci/htirq.c
+++ b/drivers/pci/htirq.c
@@ -87,12 +87,9 @@ void unmask_ht_irq(struct irq_data *data)
int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update)
{
struct ht_irq_cfg *cfg;
+ int max_irq, pos, irq;
unsigned long flags;
u32 data;
- int max_irq;
- int pos;
- int irq;
- int node;
pos = pci_find_ht_capability(dev, HT_CAPTYPE_IRQ);
if (!pos)
@@ -120,10 +117,8 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update)
cfg->msg.address_lo = 0xffffffff;
cfg->msg.address_hi = 0xffffffff;
- node = dev_to_node(&dev->dev);
- irq = create_irq_nr(0, node);
-
- if (irq <= 0) {
+ irq = irq_alloc_hwirq(dev_to_node(&dev->dev));
+ if (!irq) {
kfree(cfg);
return -EBUSY;
}
@@ -166,7 +161,7 @@ void ht_destroy_irq(unsigned int irq)
cfg = irq_get_handler_data(irq);
irq_set_chip(irq, NULL);
irq_set_handler_data(irq, NULL);
- destroy_irq(irq);
+ irq_free_hwirq(irq);
kfree(cfg);
}