[3.11.y.z extended stable] Patch "usb: gadget: at91-udc: fix irq and iomem resource retrieval" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Wed May 14 14:57:14 UTC 2014

This is a note to let you know that I have just added a patch titled

    usb: gadget: at91-udc: fix irq and iomem resource retrieval

to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree 
which can be found at:


If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.11.y.z tree, see



>From 28a838b8feb1148ce396aff0b0617a0d38760d66 Mon Sep 17 00:00:00 2001
From: Jean-Jacques Hiblot <jjhiblot at traphandler.com>
Date: Wed, 12 Mar 2014 17:30:08 +0100
Subject: usb: gadget: at91-udc: fix irq and iomem resource retrieval

commit 886c7c426d465732ec9d1b2bbdda5642fc2e7e05 upstream.

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 <jjhiblot at traphandler.com>
Acked-by: Boris BREZILLON <b.brezillon at overkiz.com>
Acked-by: Nicolas Ferre <nicolas.ferre at atmel.com>
Signed-off-by: Felipe Balbi <balbi at ti.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
 drivers/usb/gadget/at91_udc.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index d9a6add0..beed50e 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1703,16 +1703,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;

More information about the kernel-team mailing list