usb: gadget: factor out two helper functions from composite_bind()
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Sun, 23 Dec 2012 20:10:20 +0000 (21:10 +0100)
committerFelipe Balbi <balbi@ti.com>
Mon, 21 Jan 2013 18:52:47 +0000 (20:52 +0200)
commita59233407aed54b8a9121cea75d9c6a2a470d8d3
treef073dd5e345f1ba8e1a23480e418cee608dc825e
parent4c49a5f0ef1bc61395329ea7a9fce2893e97eaa6
usb: gadget: factor out two helper functions from composite_bind()

This patch factors out two helper functions from composite_bind()
that is composite_dev_prepare() and its counterpart
composite_dev_cleanup().

This will be used by the configfs which requries a slightly different
bind/setup code because part of its configurations (i.e. config
descripts, cdev, …) are setup in advance and VID/PID and so one should
not be overwritten. Also the setup of ep0 endpoint can be delayed until
the UDC is assigned.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/composite.c
include/linux/usb/composite.h