Michal Nazarewicz wrote:
On Tue, 21 Jun 2011 12:12:28 +0200, Sebastian Andrzej Siewior
<bigeasy@xxxxxxxxxxxxx> wrote:
@@ -155,6 +193,14 @@ err1:
}
EXPORT_SYMBOL_GPL(usb_add_gadget_udc);
+static int udc_is_newstyle(struct usb_udc *udc)
+{
+ if (udc->gadget->ops->udc_start && udc->gadget->ops->udc_stop)
+ return 1;
+ return 0;
+}
Why not just
return udc->gadget->ops->udc_start && udc->gadget->ops->udc_stop;
“&&” guarantees the result will be 0 or 1.
Sure it does. It looks more obvious to me the other way around.
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html