Thread (5 messages) flat view 5 messages, 2 authors, 2007-10-26

Re: [PATCH 1/2] powerpc: prpmc2800 - Add MTD support

From: Mark A. Greer <hidden>
Date: 2007-10-26 01:06:23

On Fri, Oct 26, 2007 at 10:23:53AM +1000, Stephen Rothwell wrote:
Hi Mark,

On Thu, 25 Oct 2007 16:39:48 -0700 "Mark A. Greer" [off-list ref] wrote:
quoted
+static int __init prpmc2800_register_mtd(void)
+{
+	struct device_node *np = NULL;
                              ^^^^^^^
Not needed if you use for_each_compatible_node().
quoted
+
+	while ((np = of_find_compatible_node(np, NULL, "cfi-flash")) != NULL)
	for_each_compatible_node(np, NULL, "cfi-flash")
quoted
+		of_platform_device_create(np, NULL, NULL);
+
+	of_node_put(np);
Not needed as np must be NULL when you get here.
Ah, yes, true on all points.  Thanks Stephen.
Update coming shortly...

Mark
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help