diff options
author | Felipe Balbi <balbi@ti.com> | 2013-01-24 17:41:00 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 11:16:55 +0200 |
commit | 7bce401cc6db5508ef2517e45bd8caf7ce0a15ee (patch) | |
tree | 1372eb8462d2f1c69258bed063ee69ab87706a02 /drivers/usb/gadget/udc-core.c | |
parent | dc9e2873b740331b186b8f315fd18bbc97108d2e (diff) | |
download | op-kernel-dev-7bce401cc6db5508ef2517e45bd8caf7ce0a15ee.zip op-kernel-dev-7bce401cc6db5508ef2517e45bd8caf7ce0a15ee.tar.gz |
usb: gadget: drop now unnecessary flag
We don't need the ->register_my_device flag
anymore because all UDC drivers have been
properly converted.
Let's remove every history of it.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc-core.c')
-rw-r--r-- | drivers/usb/gadget/udc-core.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c index 9195054..40b1d88 100644 --- a/drivers/usb/gadget/udc-core.c +++ b/drivers/usb/gadget/udc-core.c @@ -173,13 +173,11 @@ int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget) if (!udc) goto err1; - if (gadget->register_my_device) { - dev_set_name(&gadget->dev, "gadget"); + dev_set_name(&gadget->dev, "gadget"); - ret = device_register(&gadget->dev); - if (ret) - goto err2; - } + ret = device_register(&gadget->dev); + if (ret) + goto err2; device_initialize(&udc->dev); udc->dev.release = usb_udc_release; @@ -211,8 +209,8 @@ err3: put_device(&udc->dev); err2: - if (gadget->register_my_device) - put_device(&gadget->dev); + put_device(&gadget->dev); + err1: return ret; } @@ -266,9 +264,7 @@ found: kobject_uevent(&udc->dev.kobj, KOBJ_REMOVE); device_unregister(&udc->dev); - - if (gadget->register_my_device) - device_unregister(&gadget->dev); + device_unregister(&gadget->dev); } EXPORT_SYMBOL_GPL(usb_del_gadget_udc); |