diff mbox

[RESEND] usb: at91-udc: fix irq and iomem resource retrieval

Message ID 1392210209-22142-1-git-send-email-nicolas.ferre@atmel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nicolas Ferre Feb. 12, 2014, 1:03 p.m. UTC
From: Jean-Jacques Hiblot <jjhiblot@traphandler.com>

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@traphandler.com>
Acked-by: Boris BREZILLON <b.brezillon@overkiz.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: stable <stable@vger.kernel.org> # 3.4
---
 drivers/usb/gadget/at91_udc.c | 10 ----------
 1 file changed, 10 deletions(-)

Comments

Nicolas Ferre March 12, 2014, 2:57 p.m. UTC | #1
On 12/02/2014 14:03, Nicolas Ferre :
> From: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
> 
> 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@traphandler.com>
> Acked-by: Boris BREZILLON <b.brezillon@overkiz.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: stable <stable@vger.kernel.org> # 3.4

Gentle ping, after having resent the patch itself.

> ---
>  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 cea8c20a1425..1926925a52a9 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;
>
Greg Kroah-Hartman March 12, 2014, 3:31 p.m. UTC | #2
On Wed, Mar 12, 2014 at 03:57:48PM +0100, Nicolas Ferre wrote:
> On 12/02/2014 14:03, Nicolas Ferre :
> > From: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
> > 
> > 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@traphandler.com>
> > Acked-by: Boris BREZILLON <b.brezillon@overkiz.com>
> > Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> > Cc: stable <stable@vger.kernel.org> # 3.4
> 
> Gentle ping, after having resent the patch itself.

It helps if you send it to the correct maintainer, remember,
scripts/get_maintainer.pl is your friend...
Nicolas Ferre March 12, 2014, 4:28 p.m. UTC | #3
On 12/03/2014 16:31, Greg Kroah-Hartman :
> On Wed, Mar 12, 2014 at 03:57:48PM +0100, Nicolas Ferre wrote:
>> On 12/02/2014 14:03, Nicolas Ferre :
>>> From: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
>>>
>>> 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@traphandler.com>
>>> Acked-by: Boris BREZILLON <b.brezillon@overkiz.com>
>>> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>>> Cc: stable <stable@vger.kernel.org> # 3.4
>>
>> Gentle ping, after having resent the patch itself.
> 
> It helps if you send it to the correct maintainer, remember,
> scripts/get_maintainer.pl is your friend...

Indeed. I add Felipe to my next attempt: sorry for the (repeated) noise.

Bye,
diff mbox

Patch

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index cea8c20a1425..1926925a52a9 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;