lkml.org 
[lkml]   [2007]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFD] alternative kobject release wait mechanism
On Thu, 26 Apr 2007 10:58:45 -0400 (EDT),
Alan Stern <stern@rowland.harvard.edu> wrote:

> > > > The remove() method must also unset driver_data.
> > >
> > > It doesn't really have to. The driver core could do it.
> >
> > I think it is more consistent if the driver takes care of the fields
> > specifically designed for its usage.
>
> Yes. However if the driver forgets to clear the field it shouldn't cause
> a warning. After all, there won't be any harm; the next driver to bind
> to the device will just overwrite the driver_data anyway.

Agreed, but it is still a good practice and should be recommended.

> > Yes. Especially since the "gone"-field may be contained in that
> > embedding structure if the subsystem controls it.
>
> No, no! The "gone" flag must be in the private data structure. If it
> were in a container of the device structure, then it could be overwritten
> when a different driver binds to the device.

Argl, thinko again. You're right, of course.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-04-26 17:13    [W:0.115 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site