aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Jacques Hiblot <[email protected]>2014-03-12 17:30:08 +0100
committerFelipe Balbi <[email protected]>2014-04-30 11:59:06 -0500
commit886c7c426d465732ec9d1b2bbdda5642fc2e7e05 (patch)
treedbe73b64ddfcf3b5eb6bdb1792cc1474c4053271
parent66668991c3515855e7a9881788feb7026f9f729f (diff)
usb: gadget: at91-udc: fix irq and iomem resource retrieval
When using dt resources retrieval (interrupts and reg properties) there is no predefined order for these resources in the platform dev resource table. Also don't expect the number of resource to be always 2. Signed-off-by: Jean-Jacques Hiblot <[email protected]> Acked-by: Boris BREZILLON <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Cc: stable <[email protected]> # 3.4 Signed-off-by: Felipe Balbi <[email protected]>
-rw-r--r--drivers/usb/gadget/at91_udc.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index f605ad8c1902..cfd18bcca723 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1709,16 +1709,6 @@ static int at91udc_probe(struct platform_device *pdev)
return -ENODEV;
}
- if (pdev->num_resources != 2) {
- DBG("invalid num_resources\n");
- return -ENODEV;
- }
- if ((pdev->resource[0].flags != IORESOURCE_MEM)
- || (pdev->resource[1].flags != IORESOURCE_IRQ)) {
- DBG("invalid resource type\n");
- return -ENODEV;
- }
-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -ENXIO;