lkml.org 
[lkml]   [2014]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb: gadget: add claimed field in struct usb_ep
Hi,

On Mon, Jun 23, 2014 at 08:07:43AM +0200, Robert Baldyga wrote:
> On 06/19/2014 05:08 PM, Felipe Balbi wrote:
> > On Mon, Jun 16, 2014 at 10:20:36AM +0200, Robert Baldyga wrote:
> >> This field allows to mark ep as claimed in more clear way. Claiming
> >> endpoint by setting driver_data to non-null value is leaky solution
> >> and makes code unreadable.
> >
> > how come ? How can it be unreadable ? how can it be leaky ?
> >
>
> What if gadget will not assign any value to driver_data (just like
> Gadget Zero do)? Endpoint will be seen as not used, and autoconfig will

huh ??? The gadget isn't the endpoint user, the function is. Look at
f_sourcesink.c and f_loopback.c. If the function doesn't set anything to
driver_data, then that's a bug on the function which needs fixing.

Moreover, if there's a function which doesn't set driver_data, we could
just as well have a function which doesn't set "claimed", so the problem
is the same.

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-06-23 22:21    [W:0.078 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site