summaryrefslogtreecommitdiffstats
path: root/drivers/xen/events.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-02-18 16:43:29 +0000
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-03-10 14:44:37 -0500
commit4b41df7f6e0b5684378d9155773c42a4577e8582 (patch)
tree9ef8bf6d42bb2c04d2a7a9ef3f0c7dd1f9b4861d /drivers/xen/events.c
parentbb5d079aefa828c292c267ed34ed2282947fa233 (diff)
xen: events: return irq from xen_allocate_pirq_msi
consistent with other similar functions. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/events.c')
-rw-r--r--drivers/xen/events.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 36e9adcdebe..ed3420df093 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -664,31 +664,34 @@ static int find_unbound_pirq(int type)
return -1;
}
-void xen_allocate_pirq_msi(char *name, int *irq, int *pirq, int alloc_pirq)
+int xen_allocate_pirq_msi(char *name, int *pirq, int alloc_pirq)
{
+ int irq;
+
spin_lock(&irq_mapping_update_lock);
- *irq = xen_allocate_irq_dynamic();
- if (*irq == -1)
+ irq = xen_allocate_irq_dynamic();
+ if (irq == -1)
goto out;
if (alloc_pirq) {
*pirq = find_unbound_pirq(MAP_PIRQ_TYPE_MSI);
if (*pirq == -1) {
- xen_free_irq(*irq);
- *irq = -1;
+ xen_free_irq(irq);
+ irq = -1;
goto out;
}
}
- set_irq_chip_and_handler_name(*irq, &xen_pirq_chip,
+ set_irq_chip_and_handler_name(irq, &xen_pirq_chip,
handle_level_irq, name);
- irq_info[*irq] = mk_pirq_info(0, *pirq, 0, 0);
- pirq_to_irq[*pirq] = *irq;
+ irq_info[irq] = mk_pirq_info(0, *pirq, 0, 0);
+ pirq_to_irq[*pirq] = irq;
out:
spin_unlock(&irq_mapping_update_lock);
+ return irq;
}
int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type)