RE: [PATCH v3 1/3] usb: udc: add usb_gadget_find_udc

2015-01-23 Thread Peter Chen
An idea just struck me... Instead of looping through all the udc's to find the right one, why not simply store a pointer to the udc in struct usb_gadget? We still have code to find usb_gadget_driver to iterate udc_list, it is better to change all, we need to have

Re: [PATCH v3 1/3] usb: udc: add usb_gadget_find_udc

2015-01-19 Thread Alan Stern
On Mon, 19 Jan 2015, Peter Chen wrote: An idea just struck me... Instead of looping through all the udc's to find the right one, why not simply store a pointer to the udc in struct usb_gadget? We still have code to find usb_gadget_driver to iterate udc_list, it is better to

Re: [PATCH v3 1/3] usb: udc: add usb_gadget_find_udc

2015-01-18 Thread Peter Chen
On Fri, Jan 16, 2015 at 10:15:45AM -0600, Felipe Balbi wrote: On Fri, Jan 16, 2015 at 11:05:07AM -0500, Alan Stern wrote: On Fri, 16 Jan 2015, Peter Chen wrote: This is an internal API, and is used to find corresponding udc according to gadget. Signed-off-by: Peter Chen

[PATCH v3 1/3] usb: udc: add usb_gadget_find_udc

2015-01-16 Thread Peter Chen
This is an internal API, and is used to find corresponding udc according to gadget. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/gadget/udc/udc-core.c | 51 --- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git

Re: [PATCH v3 1/3] usb: udc: add usb_gadget_find_udc

2015-01-16 Thread Alan Stern
On Fri, 16 Jan 2015, Peter Chen wrote: This is an internal API, and is used to find corresponding udc according to gadget. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/gadget/udc/udc-core.c | 51 --- 1 file changed, 26

Re: [PATCH v3 1/3] usb: udc: add usb_gadget_find_udc

2015-01-16 Thread Felipe Balbi
On Fri, Jan 16, 2015 at 11:05:07AM -0500, Alan Stern wrote: On Fri, 16 Jan 2015, Peter Chen wrote: This is an internal API, and is used to find corresponding udc according to gadget. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/gadget/udc/udc-core.c | 51