]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/isp116x-hcd.c
USB: Let some USB host controllers get IRQ flags from resource
[linux-2.6-omap-h63xx.git] / drivers / usb / host / isp116x-hcd.c
index ce1ca0ba0515c9a848d320dee18aaa29e5738808..4dda31b268929e4b74e7828d9d4af04764a475ee 100644 (file)
@@ -1562,11 +1562,12 @@ static int __devinit isp116x_probe(struct platform_device *pdev)
 {
        struct usb_hcd *hcd;
        struct isp116x *isp116x;
-       struct resource *addr, *data;
+       struct resource *addr, *data, *ires;
        void __iomem *addr_reg;
        void __iomem *data_reg;
        int irq;
        int ret = 0;
+       unsigned long irqflags;
 
        if (pdev->num_resources < 3) {
                ret = -ENODEV;
@@ -1575,12 +1576,16 @@ static int __devinit isp116x_probe(struct platform_device *pdev)
 
        data = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        addr = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-       irq = platform_get_irq(pdev, 0);
-       if (!addr || !data || irq < 0) {
+       ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+
+       if (!addr || !data || !ires) {
                ret = -ENODEV;
                goto err1;
        }
 
+       irq = ires->start;
+       irqflags = ires->flags & IRQF_TRIGGER_MASK;
+
        if (pdev->dev.dma_mask) {
                DBG("DMA not supported\n");
                ret = -EINVAL;
@@ -1634,7 +1639,7 @@ static int __devinit isp116x_probe(struct platform_device *pdev)
                goto err6;
        }
 
-       ret = usb_add_hcd(hcd, irq, IRQF_DISABLED);
+       ret = usb_add_hcd(hcd, irq, irqflags | IRQF_DISABLED);
        if (ret)
                goto err6;