usb: gadget: udc-core: allow udc class register gadget device
authorFelipe Balbi <balbi@ti.com>
Thu, 24 Jan 2013 12:52:24 +0000 (14:52 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 18 Mar 2013 09:16:39 +0000 (11:16 +0200)
commitf07bd56bbdaa2340ebf46af9a37e7b2d1b4578e3
tree00e341ad9d37d01667a82462b76365ca353cfe37
parent7eaf8f2a7da6506df0e6edc4fdb22678f0eb3602
usb: gadget: udc-core: allow udc class register gadget device

Currently all UDC drivers are calling
device_register() before calling
usb_add_gadget_udc(). In order to avoid
code duplication, we can allow udc-core.c
register that device.

However that would become a really large patch,
so to cope with the meanwhile and allow us
to write bite-sized patches, we're adding
a flag which will be set by UDC driver once
it removes the code for registering the
gadget device.

Once all are converted, the new flag will
be removed.

Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc-core.c
include/linux/usb/gadget.h