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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 include/linux/usb/composite.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

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;
-- 
1.7.4.1

--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux