Re: [patch] IDE driver model update

From: Patrick Mochel (mochel@osdl.org)
Date: Mon Oct 07 2002 - 18:06:51 EST


> > It's the desctrutor for the device object. ->release() is the last thing
> > called when the last reference to the device goes away. That's the only
> > time it's called.
>
> ???
>
> Details, please. When can it happen and what normally holds that object
> pinned?

get_device()/put_device(). When struct device::refcount hits 0, it's
cleaned up. c.f. drivers/base/core.c::put_device().

The bus type that the device belongs to always owns it, and could easily
be put in struct bus_type. Basically, it tells the bus that it's finally
ok to free the structure. That's not done by the driver core, since the
struct device is (so far) always embedded in a bus-specific structure.

Thoughts? Suggestions?

        -pat

-
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/



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:01:01 EST