Re: [PATCH 1/2] of: Make const the device node pointers in of_clk_get and of_node_put

From
Jean-Francois Moine <hidden>
Date
2014-11-09 19:25:40
Also in
linux-arm-kernel, lkml
Reply to
Russell King - ARM Linux, 2014-11-09
On Sun, 9 Nov 2014 18:50:19 +0000
Russell King - ARM Linux [off-list ref] wrote:
What this then means is that it fundamentally undermines the idea of
storing the pointer to a device_node as a const pointer, as the device
node must always be modified when you're done with it (because it's a
ref-counted structure.)  So, having it const in your code is a bug.

What this also means is that every other place that you've added const
below is also very dubious.
Thanks for the explanation.

The correct patch will be simpler: in the ASoC structures, I found only
three places where the device_node pointer is const.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thread (5 messages) 5 messages, 2 authors, last reply 2014-11-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help