usb: gadget: add a forward pointer from usb_function to its "instance"

We can have multiple usb_functions which origin is the same "instance".
Within one USB configuration there should be only one function of an
instance. This back pointer helps configfs to recoginze to which
instance a given usb_function belongs.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Sebastian Andrzej Siewior 2012-12-23 21:10:15 +01:00 committed by Felipe Balbi
parent 59835ad727
commit 0062f6e56f
2 changed files with 117 additions and 0 deletions

View file

@ -161,6 +161,7 @@ struct usb_function {
/* internals */
struct list_head list;
DECLARE_BITMAP(endpoints, 32);
const struct usb_function_instance *fi;
};
int usb_add_function(struct usb_configuration *, struct usb_function *);