All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] usb: gadget: at91_udc: dt: fix platform_data check
@ 2012-09-11 12:07 Fabio Porcedda
       [not found] ` <1347365267-7507-1-git-send-email-fabio.porcedda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Porcedda @ 2012-09-11 12:07 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Greg Kroah-Hartman,
	Jean-Christophe PLAGNIOL-VILLARD, Nicolas Ferre, Fabio Porcedda

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

This patch fix the dt support introduced in 3.4-rc1 by commit
("d1494a3 USB: at91: Device udc add dt support").

Tested on a at91sam9260 based board (PRO3-EVK).

Signed-off-by: Fabio Porcedda <fabio.porcedda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Stable <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> [v3.4+]
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
---
v2:
  - better description
  - add stable tag

 drivers/usb/gadget/at91_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 1e35963..660fd53 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1699,7 +1699,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;
-- 
1.7.11.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-12  7:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11 12:07 [PATCH v2] usb: gadget: at91_udc: dt: fix platform_data check Fabio Porcedda
     [not found] ` <1347365267-7507-1-git-send-email-fabio.porcedda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-09-11 12:20   ` Nicolas Ferre
     [not found]     ` <504F2C83.7080706-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2012-09-12  6:14       ` Felipe Balbi
     [not found]         ` <20120912061414.GB18563-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-09-12  7:33           ` Nicolas Ferre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.