diff options
Diffstat (limited to 'drivers/usb/host/sl811-hcd.c')
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 8a74bbb57d08..e106e9d48d4a 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -1620,22 +1620,26 @@ sl811h_probe(struct platform_device *dev) | |||
1620 | { | 1620 | { |
1621 | struct usb_hcd *hcd; | 1621 | struct usb_hcd *hcd; |
1622 | struct sl811 *sl811; | 1622 | struct sl811 *sl811; |
1623 | struct resource *addr, *data; | 1623 | struct resource *addr, *data, *ires; |
1624 | int irq; | 1624 | int irq; |
1625 | void __iomem *addr_reg; | 1625 | void __iomem *addr_reg; |
1626 | void __iomem *data_reg; | 1626 | void __iomem *data_reg; |
1627 | int retval; | 1627 | int retval; |
1628 | u8 tmp, ioaddr = 0; | 1628 | u8 tmp, ioaddr = 0; |
1629 | unsigned long irqflags; | ||
1629 | 1630 | ||
1630 | /* basic sanity checks first. board-specific init logic should | 1631 | /* basic sanity checks first. board-specific init logic should |
1631 | * have initialized these three resources and probably board | 1632 | * have initialized these three resources and probably board |
1632 | * specific platform_data. we don't probe for IRQs, and do only | 1633 | * specific platform_data. we don't probe for IRQs, and do only |
1633 | * minimal sanity checking. | 1634 | * minimal sanity checking. |
1634 | */ | 1635 | */ |
1635 | irq = platform_get_irq(dev, 0); | 1636 | ires = platform_get_resource(dev, IORESOURCE_IRQ, 0); |
1636 | if (dev->num_resources < 3 || irq < 0) | 1637 | if (dev->num_resources < 3 || !ires) |
1637 | return -ENODEV; | 1638 | return -ENODEV; |
1638 | 1639 | ||
1640 | irq = ires->start; | ||
1641 | irqflags = ires->flags & IRQF_TRIGGER_MASK; | ||
1642 | |||
1639 | /* refuse to confuse usbcore */ | 1643 | /* refuse to confuse usbcore */ |
1640 | if (dev->dev.dma_mask) { | 1644 | if (dev->dev.dma_mask) { |
1641 | DBG("no we won't dma\n"); | 1645 | DBG("no we won't dma\n"); |
@@ -1717,8 +1721,11 @@ sl811h_probe(struct platform_device *dev) | |||
1717 | * triggers (e.g. most ARM CPUs). Initial driver stress testing | 1721 | * triggers (e.g. most ARM CPUs). Initial driver stress testing |
1718 | * was on a system with single edge triggering, so most sorts of | 1722 | * was on a system with single edge triggering, so most sorts of |
1719 | * triggering arrangement should work. | 1723 | * triggering arrangement should work. |
1724 | * | ||
1725 | * Use resource IRQ flags if set by platform device setup. | ||
1720 | */ | 1726 | */ |
1721 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED); | 1727 | irqflags |= IRQF_SHARED; |
1728 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | irqflags); | ||
1722 | if (retval != 0) | 1729 | if (retval != 0) |
1723 | goto err6; | 1730 | goto err6; |
1724 | 1731 | ||