Re: [PATCHv3 5/5] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-03-10 Thread Felipe Balbi
Hi, On Wed, Mar 11, 2015 at 02:21:38AM +0200, Ruslan Bilovol wrote: > >> @@ -469,6 +488,16 @@ int usb_gadget_unregister_driver(struct > >> usb_gadget_driver *driver) > >> break; > >> } > >> > >> + if (ret) { > >> + struct usb_gadget_driver

Re: [PATCHv3 5/5] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-03-10 Thread Alan Stern
On Wed, 11 Mar 2015, Ruslan Bilovol wrote: > Hi Alan, Hello. > > If you add the list_init and list_del_init above, this loop won't be > > needed. You can just call list_del. > > I disagree with this. This function is externally visible and we can't > guarantee that some buggy code will not

Re: [PATCHv3 5/5] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-03-10 Thread Ruslan Bilovol
Hi Alan, On Tue, Feb 17, 2015 at 11:51 PM, Alan Stern wrote: > On Tue, 17 Feb 2015, Ruslan Bilovol wrote: > >> Change behavior during registration of gadgets and >> gadget drivers in udc-core. Instead of previous >> approach when for successful probe of usb gadget driver >> at least one usb

Re: [PATCHv3 5/5] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-03-10 Thread Felipe Balbi
Hi, On Wed, Mar 11, 2015 at 02:21:38AM +0200, Ruslan Bilovol wrote: @@ -469,6 +488,16 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) break; } + if (ret) { + struct usb_gadget_driver *tmp; + +

Re: [PATCHv3 5/5] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-03-10 Thread Alan Stern
On Wed, 11 Mar 2015, Ruslan Bilovol wrote: Hi Alan, Hello. If you add the list_init and list_del_init above, this loop won't be needed. You can just call list_del. I disagree with this. This function is externally visible and we can't guarantee that some buggy code will not call it

Re: [PATCHv3 5/5] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-03-10 Thread Ruslan Bilovol
Hi Alan, On Tue, Feb 17, 2015 at 11:51 PM, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 17 Feb 2015, Ruslan Bilovol wrote: Change behavior during registration of gadgets and gadget drivers in udc-core. Instead of previous approach when for successful probe of usb gadget driver at

Re: [PATCHv3 5/5] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-02-17 Thread Alan Stern
On Tue, 17 Feb 2015, Ruslan Bilovol wrote: > Change behavior during registration of gadgets and > gadget drivers in udc-core. Instead of previous > approach when for successful probe of usb gadget driver > at least one usb gadget should be already registered > use another one where gadget drivers

[PATCHv3 5/5] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-02-17 Thread Ruslan Bilovol
Change behavior during registration of gadgets and gadget drivers in udc-core. Instead of previous approach when for successful probe of usb gadget driver at least one usb gadget should be already registered use another one where gadget drivers and gadgets can be registered in udc-core

[PATCHv3 5/5] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-02-17 Thread Ruslan Bilovol
Change behavior during registration of gadgets and gadget drivers in udc-core. Instead of previous approach when for successful probe of usb gadget driver at least one usb gadget should be already registered use another one where gadget drivers and gadgets can be registered in udc-core

Re: [PATCHv3 5/5] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-02-17 Thread Alan Stern
On Tue, 17 Feb 2015, Ruslan Bilovol wrote: Change behavior during registration of gadgets and gadget drivers in udc-core. Instead of previous approach when for successful probe of usb gadget driver at least one usb gadget should be already registered use another one where gadget drivers and