Thread (3 messages) flat view 3 messages, 3 authors, 2014-11-08

Re: [PATCH v3 2/2] ASoC: simple-card: add multi-CODECs in DT

From: Jean-Francois Moine <hidden>
Date: 2014-11-07 19:05:57
Also in: alsa-devel

On Fri, 7 Nov 2014 12:30:35 +0000
Mark Brown [off-list ref] wrote:
quoted
 	} else {
-		clk = of_clk_get(args.np, 0);
+		clk = of_clk_get((struct device_node *) dai_np, 0);  
Adding this cast looks suspicous - why?  As far as I can tell the
original code didn't need one.
Right, 'args.np' was (struct device_node *), but, now, 'dai_np' is
(const struct device_node *).

Changing 'dai_np' to (struct device_node *) in the
asoc_simple_card_sub_parse_of() argument asks for a cast in calling
this function because the field 'of_node' of the struct
snd_soc_dai_link_component is (const struct device_node *).

Do you better like this last cast?

-- 
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help