Re: [PATCH RFD] alternative kobject release wait mechanism
From: Cornelia Huck
Date: Thu Apr 26 2007 - 11:10:14 EST
On Thu, 26 Apr 2007 10:58:45 -0400 (EDT),
Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/