[PATCH 12/19] powerpc: vio bus support for CMO
Stephen Rothwell
sfr at canb.auug.org.au
Fri Jun 13 15:12:21 EST 2008
Hi Robert,
Firstly, can all this new stuff be ifdef'ed out if not needed as the
vio infrastructure is also used on legacy iSeries and this adds quite a
bit of stuff that won't ever be used there.
On Thu, 12 Jun 2008 17:19:59 -0500 Robert Jennings <rcj at linux.vnet.ibm.com> wrote:
>
> +static int vio_cmo_num_OF_devs(void)
> +{
> + struct device_node *node_vroot;
> + int count = 0;
> +
> + /*
> + * Count the number of vdevice entries with an
> + * ibm,my-dma-window OF property
> + */
> + node_vroot = of_find_node_by_name(NULL, "vdevice");
> + if (node_vroot) {
> + struct device_node *of_node;
> + struct property *prop;
> +
> + for (of_node = node_vroot->child; of_node != NULL;
> + of_node = of_node->sibling) {
Use:
for_each_child_of_node(node_vroot, of_node) {
--
Cheers,
Stephen Rothwell sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080613/89fd42ae/attachment.pgp>
More information about the Linuxppc-dev
mailing list