linux-mips
[Top] [All Lists]

[PATCH] bcm63xx: use platform_get_irq in ehci-bcm63xx.c

To: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH] bcm63xx: use platform_get_irq in ehci-bcm63xx.c
From: Maxime Bizon <mbizon@freebox.fr>
Date: Mon, 1 Jun 2009 19:08:14 +0200
Cc: Florian Fainelli <florian@openwrt.org>, Maxime Bizon <mbizon@freebox.fr>
In-reply-to: <1243876095-8987-1-git-send-email-mbizon@freebox.fr>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1243876095-8987-1-git-send-email-mbizon@freebox.fr>
Sender: linux-mips-bounce@linux-mips.org
As requested by USB maintainer, use platform_get_irq instead of
platform_get_resource.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/usb/host/ehci-bcm63xx.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/host/ehci-bcm63xx.c b/drivers/usb/host/ehci-bcm63xx.c
index 2fef571..0aba0f9 100644
--- a/drivers/usb/host/ehci-bcm63xx.c
+++ b/drivers/usb/host/ehci-bcm63xx.c
@@ -62,15 +62,15 @@ static const struct hc_driver ehci_bcm63xx_hc_driver = {
 
 static int __devinit ehci_hcd_bcm63xx_drv_probe(struct platform_device *pdev)
 {
-       struct resource *res_mem, *res_irq;
+       struct resource *res_mem;
        struct usb_hcd *hcd;
        struct ehci_hcd *ehci;
        u32 reg;
-       int ret;
+       int ret, irq;
 
        res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-       if (!res_mem || !res_irq)
+       irq = platform_get_irq(pdev, 0);;
+       if (!res_mem || irq < 0)
                return -ENODEV;
 
        reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_REG);
@@ -109,7 +109,7 @@ static int __devinit ehci_hcd_bcm63xx_drv_probe(struct 
platform_device *pdev)
        ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
        ehci->sbrn = 0x20;
 
-       ret = usb_add_hcd(hcd, res_irq->start, IRQF_DISABLED);
+       ret = usb_add_hcd(hcd, irq, IRQF_DISABLED);
        if (ret)
                goto out2;
 
-- 
1.6.0.4


<Prev in Thread] Current Thread [Next in Thread>