Hi,
On Thu, Sep 16, 2010 at 04:42:51AM -0500, Michał Nazarewicz wrote:
+ if (udc->busy)
I'd say "if (WARN_ON(udc->busy))".
I wanted to keep the same behavior as we have with the host side. You
can, at any time, modprobe -r ehci_hcd and it'll unregister all drivers
registered to ehci-hcd and no WARN() is printed.
+ usb_gadget_unregister_driver(udc->driver);
Maybe add a __usb_gadget_unregister_driver() function which would
take udc as argument and unregister the driver?
Also, note that a concurrent call to usb_gadget_register_driver()
could grab this UDC and register a driver to it. The list_del() should
be moved above the condition.
fixed.
+ * @driver - the gadget driver pointer. Always provide this.
Actually, always set to NULL. This field is modified only by the
class code, right? UDC driver should not touch it. Or am I missing
something.
yeah, copy&paste failure here.
+ unsigned busy:1;
I started wondering if this field is really needed. After all,
this field is set only if driver is not-NULL.
true, we chan chge that later.
+ const char *name;
Is that required? Wouldn't dev's or gadget's dev's name be enough?
maybe...
--
balbi
--
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