kernel-ark/include
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
..
acpi
asm-alpha
asm-arm
asm-avr32 Fix timerfd breakage on avr32 2008-02-05 14:37:15 -08:00
asm-blackfin
asm-cris
asm-frv timerfd: fix remaining architectures 2008-02-05 14:37:15 -08:00
asm-generic
asm-h8300
asm-ia64 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2008-02-05 10:24:52 -08:00
asm-m32r timerfd: fix remaining architectures 2008-02-05 14:37:15 -08:00
asm-m68k
asm-m68knommu
asm-mips
asm-parisc
asm-powerpc ppc: fix #ifdef-s in mediabay driver (take 2) 2008-02-06 02:57:50 +01:00
asm-ppc
asm-s390 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2008-02-05 10:11:02 -08:00
asm-sh timerfd: fix remaining architectures 2008-02-05 14:37:15 -08:00
asm-sparc
asm-sparc64
asm-um uml: LDT mutex conversion 2008-02-05 09:44:31 -08:00
asm-v850
asm-x86
asm-xtensa
crypto
keys
linux [POWERPC] Add of_get_next_parent() 2008-02-06 16:29:59 +11:00
math-emu
media
mtd
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-02-05 10:09:07 -08:00
pcmcia
rdma
rxrpc
scsi
sound
video
xen
Kbuild