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/