Subject: Re: [RFC/PATCH 4/4] Add support for MSI on Axon-based Cell systems

From: Arnd Bergmann <[email-masked]>
Date: Fri, 8 Jun 2007 21:26:23 +0200

On Friday 08 June 2007, Segher Boessenkool wrote:
> >>> + =A0 =A0 =A0 for_each_compatible_node(node, NULL, "ibm,axon-msic") {
> >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (axon_msi_setup_one(of_node_get(node=
)) =3D=3D 0)
> >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 found++;
> >>> + =A0 =A0 =A0 }
> >>> + =A0 =A0 =A0 of_node_put(node);
>=20
> So where is the of_node_put() done for the of_node_get()
> inside the loop?

of_find_compatible_node does an of_node_put() on the device_node
that you pass in as the 'from' argument. In the last step, 'node'
is set to NULL and we put the previous element.

	Arnd <><