On Tue, Apr 21, 2009 at 08:43:28AM +0200, Michael Trimarchi wrote: > >>> Exactly, what are you trying to do that differs from > >>> device_for_each_child()? > >>> > >>> > >> Is device for each child use to visist the first level of the tree? > >> > > > > Have you tried it? > > > No, I take a look at the code. > > int device_for_each_child(struct device *parent, void *data, > int (*fn)(struct device *dev, void *data)) > { > struct klist_iter i; > struct device *child; > int error = 0; > > klist_iter_init(&parent->p->klist_children, &i); > > I was thinking that the klist_children is the fist_level one children, > so each time > a device is registerd it add the link to the parent. Yes it does. But you have to start at some device, right? So you don't need to iterate over it, just go from there on down if needed. So I don't see why this helper function is needed at all yet, shouldn't we be doing the check within the normal suspend device walk of the tree? thanks, greg k-h _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm