diff mbox

[1/3] USB: Gadget: Add private data hook for config

Message ID 1308945883-643-1-git-send-email-jaswinder.singh@linaro.org
State New
Headers show

Commit Message

Jassi Brar June 24, 2011, 8:04 p.m. UTC
Currently gadget drivers, which do, allocate resources for
functions during configuration bind, and free them during
function unbind. Which isn't very correct, even though it
works for now.
Provide a hook in 'struct usb_configuration' as a way for
configurations to save pointer to resources allocated
during 'bind', which might come handy during 'unbind'.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
---
 include/linux/usb/composite.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index 3d29a7d..e94339d 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -219,6 +219,8 @@  struct usb_configuration {
 	struct usb_composite_dev	*cdev;
 
 	/* private: */
+	/* Gadget driver specific data, typically for use at unbind */
+	void *data;
 	/* internals */
 	struct list_head	list;
 	struct list_head	functions;