Files
linux-st/include/linux
Michael Ellerman f4eb010706 [POWERPC] Add of_get_next_parent()
Iterating through a device node's parents is simple enough, but dealing
with the refcounts properly is a little ugly, and replicating that logic
is asking for someone to get it wrong or forget it all together, eg:

while (dn != NULL) {
	/* loop body */
	tmp = of_get_parent(dn);
	of_node_put(dn);
	dn = tmp;
}

So add of_get_next_parent(), inspired by of_get_next_child().  The
contract is that it returns the parent and drops the reference on the
current node, this makes the loop look like:

while (dn != NULL) {
	/* loop body */
	dn = of_get_next_parent(dn);
}

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-02-06 16:29:59 +11:00
..
2008-02-05 09:44:13 -08:00
2008-02-05 03:20:13 -08:00
2008-02-03 17:45:46 +02:00
2008-02-05 09:44:07 -08:00
2008-02-03 17:45:46 +02:00
2008-02-03 15:42:53 +02:00
2008-02-03 17:45:46 +02:00
2008-02-03 17:45:46 +02:00
2008-02-03 15:42:53 +02:00
2008-02-05 09:44:19 -08:00
2008-02-05 09:44:07 -08:00
2008-02-06 02:57:51 +01:00
2008-02-03 17:45:46 +02:00
2008-02-05 09:44:16 -08:00
2008-02-06 16:29:59 +11:00
2008-02-05 09:44:19 -08:00
2008-02-02 11:32:01 -08:00
2008-02-02 02:44:34 +03:00
2008-02-05 03:20:13 -08:00
2008-02-03 17:45:46 +02:00
2008-02-03 17:45:46 +02:00
2008-02-05 09:44:22 -08:00
2008-02-04 10:56:03 -08:00
2008-02-03 17:45:46 +02:00
2008-02-05 09:44:15 -08:00
2008-02-05 09:44:16 -08:00
2008-02-05 09:44:07 -08:00
2008-02-04 23:50:13 +11:00
2008-02-04 23:50:03 +11:00
2008-02-04 23:50:02 +11:00
2008-02-04 23:50:03 +11:00
2008-02-05 09:44:07 -08:00
2008-02-03 15:42:53 +02:00