[patch 16/32] tile: usb: Use irq_alloc/free_hwirq

From: Thomas Gleixner
Date: Wed May 07 2014 - 11:51:03 EST


No functional change. Just convert to the new interface.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Chris Metcalf <cmetcalf@xxxxxxxxxx>
---
drivers/usb/host/ehci-tilegx.c | 8 ++++----
drivers/usb/host/ohci-tilegx.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)

Index: tip/drivers/usb/host/ehci-tilegx.c
===================================================================
--- tip.orig/drivers/usb/host/ehci-tilegx.c
+++ tip/drivers/usb/host/ehci-tilegx.c
@@ -142,8 +142,8 @@ static int ehci_hcd_tilegx_drv_probe(str
ehci->hcs_params = readl(&ehci->caps->hcs_params);

/* Create our IRQs and register them. */
- pdata->irq = create_irq();
- if (pdata->irq < 0) {
+ pdata->irq = irq_alloc_hwirq(-1);
+ if (!pdata->irq) {
ret = -ENXIO;
goto err_no_irq;
}
@@ -175,7 +175,7 @@ static int ehci_hcd_tilegx_drv_probe(str
}

err_have_irq:
- destroy_irq(pdata->irq);
+ irq_free_hwirq(pdata->irq);
err_no_irq:
tilegx_stop_ehc();
usb_put_hcd(hcd);
@@ -193,7 +193,7 @@ static int ehci_hcd_tilegx_drv_remove(st
usb_put_hcd(hcd);
tilegx_stop_ehc();
gxio_usb_host_destroy(&pdata->usb_ctx);
- destroy_irq(pdata->irq);
+ irq_free_hwirq(pdata->irq);

return 0;
}
Index: tip/drivers/usb/host/ohci-tilegx.c
===================================================================
--- tip.orig/drivers/usb/host/ohci-tilegx.c
+++ tip/drivers/usb/host/ohci-tilegx.c
@@ -129,8 +129,8 @@ static int ohci_hcd_tilegx_drv_probe(str
tilegx_start_ohc();

/* Create our IRQs and register them. */
- pdata->irq = create_irq();
- if (pdata->irq < 0) {
+ pdata->irq = irq_alloc_hwirq(-1);
+ if (!pdata->irq) {
ret = -ENXIO;
goto err_no_irq;
}
@@ -164,7 +164,7 @@ static int ohci_hcd_tilegx_drv_probe(str
}

err_have_irq:
- destroy_irq(pdata->irq);
+ irq_free_hwirq(pdata->irq);
err_no_irq:
tilegx_stop_ohc();
usb_put_hcd(hcd);
@@ -182,7 +182,7 @@ static int ohci_hcd_tilegx_drv_remove(st
usb_put_hcd(hcd);
tilegx_stop_ohc();
gxio_usb_host_destroy(&pdata->usb_ctx);
- destroy_irq(pdata->irq);
+ irq_free_hwirq(pdata->irq);

return 0;
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/