[PATCH] of_detach_node()'s device node argument cannot be const

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE6964d

3 messages, 2 authors, 2007-07-20 · open the first message on its own page

[PATCH] of_detach_node()'s device node argument cannot be const

From: Segher Boessenkool <hidden>
Date: 2007-07-20 05:58:44

...since it modifies it (when it sets the OF_DETACHED flag).

Signed-off-by: Segher Boessenkool <redacted>
---
 arch/powerpc/kernel/prom.c |    2 +-
 include/asm-powerpc/prom.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 37ff99b..67a1bda 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1433,7 +1433,7 @@ void of_attach_node(struct device_node *np)
  * a reference to the node.  The memory associated with the node
  * is not freed until its refcount goes to zero.
  */
-void of_detach_node(const struct device_node *np)
+void of_detach_node(struct device_node *np)
 {
 	struct device_node *parent;
 
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index 1632baa..1bba741 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -160,7 +160,7 @@ extern unsigned long __init of_get_flat_dt_root(void);
 
 /* For updating the device tree at runtime */
 extern void of_attach_node(struct device_node *);
-extern void of_detach_node(const struct device_node *);
+extern void of_detach_node(struct device_node *);
 
 /* Other Prototypes */
 extern void finish_device_tree(void);
-- 
1.5.2.1.144.gabc40-dirty

Re: [PATCH] of_detach_node()'s device node argument cannot be const

From: Stephen Rothwell <hidden>
Date: 2007-07-20 06:11:53

On Fri, 20 Jul 2007 07:58:38 +0200 Segher Boessenkool [off-list ref] wrote:
...since it modifies it (when it sets the OF_DETACHED flag).
http://patchwork.ozlabs.org/linuxppc/patch?q=Stephen%20Rothwell&id=12212

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Re: [PATCH] of_detach_node()'s device node argument cannot be const

From: Segher Boessenkool <hidden>
Date: 2007-07-20 07:58:24

quoted
...since it modifies it (when it sets the OF_DETACHED flag).
http://patchwork.ozlabs.org/linuxppc/patch?q=Stephen% 
20Rothwell&id=12212
Ah okay :-)


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