Skip to contentSkip to conversation

usb: gadget: at91_udc: fix dt support

PATCH Superseded Fabio Porcedda 2 participants 2 messages Sep 7, 2012

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: gadget: at91_udc: fix dt support

Don't fail the initialization check for the platform_data if there is avaiable an associated device tree node.

---
 drivers/usb/gadget/at91_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/at91_udc.c +1 -1
index c9e66df..4147219 100644
@@ -1703,7 +1703,7 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
 	int		retval;
 	struct resource	*res;
 
-	if (!dev->platform_data) {
+	if (!dev->platform_data && !pdev->dev.of_node) {
 		/* small (so we copy it) but critical! */
 		DBG("missing platform_data\n");
 		return -ENODEV;
Signature · 6 lines
1.7.11.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

PATCH 1/1 usb: gadget: at91_udc: fix dt support

On 09/07/2012 03:27 PM, Fabio Porcedda :

Quoted 4 lines

Don't fail the initialization check for the platform_data if there is avaiable an associated device tree node.

Thanks, bye,

Quoted 18 lines
---
 drivers/usb/gadget/at91_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/at91_udc.c +1 -1
index c9e66df..4147219 100644
@@ -1703,7 +1703,7 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
 	int		retval;
 	struct resource	*res;
 
-	if (!dev->platform_data) {
+	if (!dev->platform_data && !pdev->dev.of_node) {
 		/* small (so we copy it) but critical! */
 		DBG("missing platform_data\n");
 		return -ENODEV;
Signature · 1 line
Nicolas Ferre