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.
+
+
static void usb_gadget_remove_driver(struct usb_udc *udc)
{
dev_dbg(&udc->dev, "unregistering UDC driver [%s]\n",
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +-----<email/xmpp: mnazarewicz@xxxxxxxxxx>-----ooO--(_)--Ooo--
--
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