diff options
Diffstat (limited to 'drivers/usb/host/isp116x-hcd.c')
-rw-r--r-- | drivers/usb/host/isp116x-hcd.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c index ce1ca0ba0515..4dda31b26892 100644 --- a/drivers/usb/host/isp116x-hcd.c +++ b/drivers/usb/host/isp116x-hcd.c | |||
@@ -1562,11 +1562,12 @@ static int __devinit isp116x_probe(struct platform_device *pdev) | |||
1562 | { | 1562 | { |
1563 | struct usb_hcd *hcd; | 1563 | struct usb_hcd *hcd; |
1564 | struct isp116x *isp116x; | 1564 | struct isp116x *isp116x; |
1565 | struct resource *addr, *data; | 1565 | struct resource *addr, *data, *ires; |
1566 | void __iomem *addr_reg; | 1566 | void __iomem *addr_reg; |
1567 | void __iomem *data_reg; | 1567 | void __iomem *data_reg; |
1568 | int irq; | 1568 | int irq; |
1569 | int ret = 0; | 1569 | int ret = 0; |
1570 | unsigned long irqflags; | ||
1570 | 1571 | ||
1571 | if (pdev->num_resources < 3) { | 1572 | if (pdev->num_resources < 3) { |
1572 | ret = -ENODEV; | 1573 | ret = -ENODEV; |
@@ -1575,12 +1576,16 @@ static int __devinit isp116x_probe(struct platform_device *pdev) | |||
1575 | 1576 | ||
1576 | data = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1577 | data = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1577 | addr = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 1578 | addr = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
1578 | irq = platform_get_irq(pdev, 0); | 1579 | ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
1579 | if (!addr || !data || irq < 0) { | 1580 | |
1581 | if (!addr || !data || !ires) { | ||
1580 | ret = -ENODEV; | 1582 | ret = -ENODEV; |
1581 | goto err1; | 1583 | goto err1; |
1582 | } | 1584 | } |
1583 | 1585 | ||
1586 | irq = ires->start; | ||
1587 | irqflags = ires->flags & IRQF_TRIGGER_MASK; | ||
1588 | |||
1584 | if (pdev->dev.dma_mask) { | 1589 | if (pdev->dev.dma_mask) { |
1585 | DBG("DMA not supported\n"); | 1590 | DBG("DMA not supported\n"); |
1586 | ret = -EINVAL; | 1591 | ret = -EINVAL; |
@@ -1634,7 +1639,7 @@ static int __devinit isp116x_probe(struct platform_device *pdev) | |||
1634 | goto err6; | 1639 | goto err6; |
1635 | } | 1640 | } |
1636 | 1641 | ||
1637 | ret = usb_add_hcd(hcd, irq, IRQF_DISABLED); | 1642 | ret = usb_add_hcd(hcd, irq, irqflags | IRQF_DISABLED); |
1638 | if (ret) | 1643 | if (ret) |
1639 | goto err6; | 1644 | goto err6; |
1640 | 1645 | ||