Thread (3 messages) flat view 3 messages, 3 authors, 2007-05-12

Re: [PATCH v3] 83xx USB platform code rework

From: Stephen Rothwell <hidden>
Date: 2007-05-11 12:13:10

On Fri, 11 May 2007 19:32:37 +0800 Li Yang [off-list ref] wrote:
+	if ((np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr"))
+				!= NULL) {
Normally we like to separate the assignment from the test.  There are a
couple of other places like this.
+		} else if (prop && !strcmp(prop, "serial")) {
+			if (!strcmp(of_get_property(np, "dr_mode", NULL), "otg")) {
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Is there any chance that np doesn't have a "dr_mode" property?
+#ifdef CONFIG_USB_OTG
+		/* Set OTG_PORT */
+		if (!strcmp(of_get_property(np, "dr_mode", NULL), "otg"))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Again.

--
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help