usb: at91-udc: fix irq and iomem resource retrieval
Subsystems (3)
PATCH 1/1 usb: 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.
--- drivers/usb/gadget/at91_udc.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/usb/gadget/at91_udc.c +0 -10
@@ -1710,16 +1710,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 ;
Signature · 1 line
1.8.5.2
PATCH 1/1 usb: at91-udc: fix irq and iomem resource retrieval
On 23/01/2014 15:41, Jean-Jacques Hiblot :
Quoted 5 lines
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]>
Yes, indeed.
Maybe we can also add a "stable" tag to it. Looking at the history of this file, I think that we can add a pretty old stable limit... But as it only makes sense with DT, I would advice something like this, for the 3.4-ish timeframe:
Bye,
Quoted 26 lines
--- drivers/usb/gadget/at91_udc.c | 10 ---------- 1 file changed, 10 deletions(-)drivers/usb/gadget/at91_udc.c +0
-10@@ -1710,16 +1710,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 ;
Signature · 1 line
Nicolas Ferre
PATCH 1/1 usb: at91-udc: fix irq and iomem resource retrieval
Quoted 6 lines · Nicolas Ferre
On 23/01/2014 15:41, Jean-Jacques Hiblot :
Quoted 5 lines
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]>
Quoted 40 lines
Yes, indeed.
Acked-by Nicolas Ferre <[email protected]>Maybe we can also add a "stable" tag to it. Looking at the history of this file, I think that we can add a pretty old stable limit... But as it only makes sense with DT, I would advice something like this, for the 3.4-ish timeframe:
Cc stable <[email protected]> # 3.4Bye,
Quoted 26 lines
--- drivers/usb/gadget/at91_udc.c | 10 ---------- 1 file changed, 10 deletions(-)drivers/usb/gadget/at91_udc.c +0
-10@@ -1710,16 +1710,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 ;
PATCH RESEND 1/1 usb: at91-udc: fix irq and iomem resource retrieval
In reply to Jean-Jacques HiblotFrom: Jean-Jacques Hiblot <[email protected]>
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.
--- drivers/usb/gadget/at91_udc.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/usb/gadget/at91_udc.c +0 -10
@@ -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 ;
Signature · 1 line
1.8.2.2
On 12/02/2014 14:03, Nicolas Ferre :
Quoted 10 lines
From: Jean-Jacques Hiblot <[email protected]>
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
Gentle ping, after having resent the patch itself.
Quoted 26 lines
--- drivers/usb/gadget/at91_udc.c | 10 ---------- 1 file changed, 10 deletions(-)drivers/usb/gadget/at91_udc.c +0
-10@@ -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 ;
Signature · 1 line
Nicolas Ferre
Greg Kroah-Hartman
maintainerQuoted 7 lines · Nicolas Ferre
On 12/02/2014 14:03, Nicolas Ferre :
Quoted 6 lines
From: Jean-Jacques Hiblot <[email protected]>
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.
Quoted 6 lines
Quoted 4 lines
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.4Gentle 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...
On 12/03/2014 16:31, Greg Kroah-Hartman :
Quoted 13 lines · Nicolas Ferre
Quoted 12 lines
On 12/02/2014 14:03, Nicolas Ferre :
Quoted 10 lines
From: Jean-Jacques Hiblot <[email protected]>
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
Quoted 4 lines
Quoted 1 line
Gentle ping, after having resent the patch itself.
It helps if you send it to the correct maintainer, remember,
scripts/get_maintainer.plis your friend...
Indeed. I add Felipe to my next attempt: sorry for the (repeated) noise.
Bye,
Signature · 1 line
Nicolas Ferre
PATCH RESEND 1/1 usb: at91-udc: fix irq and iomem resource retrieval
In reply to Jean-Jacques HiblotFrom: Jean-Jacques Hiblot <[email protected]>
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.
--- drivers/usb/gadget/at91_udc.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/usb/gadget/at91_udc.c +0 -10
@@ -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 ;
Signature · 1 line
1.8.2.2