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 09:44:13 -08:00
2008-02-05 03:20:13 -08:00
2008-02-01 14:35:07 -08:00
2008-02-05 14:33:32 +10:00
2008-02-05 14:33:32 +10:00
2008-02-04 13:16:39 +00:00
2008-02-05 09:44:20 -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 04:28:53 -08:00
2008-02-05 09:44:10 -08:00
2008-02-05 09:44:11 -08:00
2008-02-03 17:45:46 +02:00
2008-02-03 17:45:46 +02:00
2008-02-04 07:58:52 -08:00
2008-02-05 09:44:17 -08:00
2008-02-03 15:42:53 +02:00
2008-02-01 23:09:34 +01:00
2008-02-05 09:44:19 -08:00
2008-02-05 09:44:07 -08:00
2008-02-05 09:44:23 -08:00
2008-02-06 02:57:51 +01:00
2008-02-05 09:44:20 -08:00
2008-02-03 08:58:07 +01:00
2008-02-05 09:44:11 -08:00
2008-02-05 03:18:51 -08:00
2008-02-05 09:44:23 -08:00
2008-02-04 23:49:57 +11:00
2008-02-03 17:45:46 +02:00
2008-02-05 09:44:23 -08:00
2008-02-05 09:44:16 -08:00
2008-02-05 09:44:18 -08:00
2008-02-05 09:44:08 -08:00
2008-02-01 18:30:53 -05:00
2008-02-05 09:44:24 -08:00
2008-02-06 16:29:59 +11:00
2008-02-05 09:44:19 -08:00
2008-02-05 09:44:09 -08:00
2008-02-02 11:32:01 -08:00
2008-02-01 15:04:29 -08:00
2008-02-05 09:44:12 -08:00
2008-02-02 02:44:34 +03:00
2008-02-03 04:28:41 -08:00
2008-02-05 03:20:13 -08:00
2008-02-05 09:44:22 -08:00
2008-02-03 17:45:46 +02:00
2008-02-03 17:45:46 +02:00
2008-02-02 02:43:00 +03:00
2008-02-05 09:44:20 -08:00
2008-02-05 09:44:16 -08:00
2008-02-03 16:12:47 +02:00
2008-02-05 09:44:22 -08:00
2008-02-03 15:42:53 +02:00
2008-02-05 03:17:22 -08:00
2008-02-05 09:44:20 -08:00
2008-02-05 09:44:20 -08:00
2008-02-05 09:44:09 -08:00
2008-02-03 15:12:15 +02:00
2008-02-04 23:49:56 +11:00
2008-02-04 10:56:03 -08:00
2008-02-03 17:45:46 +02:00
2008-02-03 17:45:46 +02:00
2008-02-01 18:30:53 -05:00
2008-02-05 09:44:17 -08: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-05 09:44:20 -08:00
2008-02-01 14:34:49 -08:00
2008-02-01 14:35:07 -08:00
2008-02-01 14:34:58 -08:00
2008-02-04 23:50:13 +11:00
2008-02-04 23:50:01 +11:00
2008-02-04 23:50:03 +11:00
2008-02-04 23:50:02 +11:00
2008-02-04 23:50:12 +11:00
2008-02-04 23:50:00 +11:00
2008-02-04 23:50:03 +11:00
2008-02-05 09:44:14 -08:00
2008-02-05 09:44:07 -08:00
2008-02-03 15:42:53 +02:00
2008-02-05 09:44:19 -08:00
2008-02-05 09:44:20 -08:00