Re: [PATCH 1/6] driver-core : add class iteration api

From: Cornelia Huck
Date: Tue Jan 22 2008 - 03:44:26 EST


On Tue, 22 Jan 2008 15:27:08 +0800,
Dave Young <hidave.darkstar@xxxxxxxxx> wrote:

> On Mon, Jan 21, 2008 at 10:24:17PM -0800, David Brownell wrote:
> > This is called with class->sem held. So fn() has a
> > constraint to not re-acquire that ... else it'd be
> > self-deadlocking. I'd like to see docs at least
> > mention that; calls to add or remove class members
> > would be verboten, for example, which isn't an issue
> > with most other driver model iterators.

Indeed, it's a good idea to point this out.

> Update kerneldoc as david brownell's sugestion.
> Is it right for me add Cornelia Huck's ack after this change?

Fine with me.

> ---
>
> Add the following class iteration functions for driver use:
> class_for_each_device
> class_find_device
> class_for_each_child
> class_find_child
>
> Signed-off-by: Dave Young <hidave.darkstar@xxxxxxxxx>
> Acked-by: Cornelia Huck <cornelia.huck@xxxxxxxxxx>
>
> ---
> drivers/base/class.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++
> include/linux/device.h | 11 ++-
> 2 files changed, 184 insertions(+), 2 deletions(-)
--
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/