On 06/14/2011 05:09 PM, Balbi, Felipe wrote:
+ mutex_unlock(&udc_lock);
+ return 0;
+err3:
+ list_del(&udc->list);
+ mutex_unlock(&udc_lock);
+
+err2:
+ put_device(&udc->dev);
On Thu, 16 Jun 2011 11:20:50 +0200, Roger Quadros wrote:
memory leaks here. need to free udc.
release callback does that, doesn't it?
+static void usb_gadget_remove_driver(struct usb_udc *udc)
+{
+ dev_dbg(&udc->dev, "unregistering UDC driver [%s]\n",
+ udc->gadget->name);
+
+ kobject_uevent(&udc->dev.kobj, KOBJ_CHANGE);
Do you really need this? It will be immediately followed by a
KOBJ_REMOVE since you call device_unregister() soon after.
Not necessarily. usb_gadget_remove_driver() is called both when
UDC device driver is unloaded or when gadget driver is unloaded.
In the letter case the UDC device is not removed.
Also, I think it's nice that whenever gadget is removed from the
device CHANGE is generated -- less cases for users to worry about.
missing description?
Description in .h file. Maybe all should be moved there? Or here?
+int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
+ int (*bind)(struct usb_gadget *))
ditto.
Ditto. ;)
+int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
--
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