On Mon, May 13, 2002 at 03:51:54PM -0700, David Brownell wrote:
> > > > See my previous response to Johannes about
> > > > what Documentation/CodingStyle says.
> > >
> > > You quoted "if another thread can find your data structure,
> > > and you don't have a reference count on it you almost
> > > certainly have a bug". But see above -- the count does
> > > not need to be driver-visible.
> >
> > But one of the threads that can touch that data structure, comes
> > directly from the device driver itself. We _need_ that protection!
>
> We _have_ that protection because only device drivers that
> claim an interface, perhaps via probe(), are allowed to use
> that device. To repeat: the protection doesn't need to be
> explicit in the driver programming interfaces.
{sigh}
This could go on all day...
How about this. Given mine and Johannes's patches, do you see any
problems in the code? Does it break anything?
I like the naming convention and implementation now much better than
before. It follows the way other kernel structures are reference
counted, and because of that, is easier to understand.
> On the other hand, usbdevfs doesn't necessarily bother to
> claim interfaces when it makes control calls. Since that's
> internal to usbcore, I don't think that undermines my point.
> It's already got its fingers in lots of places "real drivers"
> aren't allowed to go.
Now that's just a whole different topic, and it's already listed in the
USB TODO list :)
greg k-h
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel