usb: udc: store usb_udc pointer in struct usb_gadget
authorPeter Chen <peter.chen@freescale.com>
Fri, 6 Mar 2015 02:36:02 +0000 (10:36 +0800)
committerFelipe Balbi <balbi@ti.com>
Thu, 19 Mar 2015 16:25:46 +0000 (11:25 -0500)
commitdfea9c94837d27e38c8cc85a3c1c7c268973c3c2
treeb4f76788c83c4a0a8ae8e01e349e02055eb01bf9
parent7252f1bfd4bc97ec4b5fa7adaf3a1a45c325635c
usb: udc: store usb_udc pointer in struct usb_gadget

Instead of iterate to find usb_udc according to usb_gadget, this
way is easier.

Alan Stern suggests this way too:
http://marc.info/?l=linux-usb&m=142168496528894&w=2

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc/udc-core.c
include/linux/usb/gadget.h