[U-Boot] [PATCH 3/4] usb:gadget: Wrapper for extracting usb_gadget from linux's device
Marek Vasut
marex at denx.de
Sat Apr 14 11:47:54 CEST 2012
Dear Lukasz Majewski,
> Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
> Cc: Marek Vasut <marex at denx.de>
> ---
> include/linux/usb/gadget.h | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
> index 275cb5f..b0a0e1f 100644
> --- a/include/linux/usb/gadget.h
> +++ b/include/linux/usb/gadget.h
> @@ -481,6 +481,11 @@ static inline void *get_gadget_data(struct usb_gadget
> *gadget) return gadget->dev.driver_data;
> }
>
> +static inline struct usb_gadget *dev_to_usb_gadget(struct device *dev)
> +{
> + return container_of(dev, struct usb_gadget, dev);
> +}
> +
> /* iterates the non-control endpoints; 'tmp' is a struct usb_ep pointer */
> #define gadget_for_each_ep(tmp, gadget) \
> list_for_each_entry(tmp, &(gadget)->ep_list, ep_list)
Maybe you should put all these patches together and show us only the product --
the stripped down version of this composite driver.
Best regards,
Marek Vasut
More information about the U-Boot
mailing list