[PATCH 1/2] powerpc: prpmc2800 - Add MTD support
Stephen Rothwell
sfr at canb.auug.org.au
Fri Oct 26 10:23:53 EST 2007
Hi Mark,
On Thu, 25 Oct 2007 16:39:48 -0700 "Mark A. Greer" <mgreer at mvista.com> wrote:
>
> +static int __init prpmc2800_register_mtd(void)
> +{
> + struct device_node *np = NULL;
^^^^^^^
Not needed if you use for_each_compatible_node().
> +
> + while ((np = of_find_compatible_node(np, NULL, "cfi-flash")) != NULL)
for_each_compatible_node(np, NULL, "cfi-flash")
> + of_platform_device_create(np, NULL, NULL);
> +
> + of_node_put(np);
Not needed as np must be NULL when you get here.
--
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: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20071026/85804894/attachment.pgp>
More information about the Linuxppc-dev
mailing list