[PATCH 12/19] powerpc: vio bus support for CMO

Robert Jennings rcj at linux.vnet.ibm.com
Tue Jun 24 06:23:49 EST 2008


* Stephen Rothwell (sfr at canb.auug.org.au) wrote:
> 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.

I've changed the patch to ifdef out CMO for legacy iSeries.  This should
keep things cleaner.

> 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) {

Fixed.



More information about the Linuxppc-dev mailing list