提交 7c59bc55 编写于 作者: S Shawn Guo 提交者: Mark Brown

ASoC: fsl: align mpc8610_hpcd with p1022_ds on getting codec node

Align mpc8610_hpcd with p1022_ds on getting codec node by just calling
of_parse_phandle.  The bonus point of doing that is we can save
exporting get_node_by_phandle_name() when we consolidate the common
bits between mpc8610_hpcd and p1022_ds into a module, which can be
shared by more machine drivers added later.
Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
Acked-by: NTimur Tabi <timur@freescale.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 fb1a6453
......@@ -336,12 +336,8 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev)
const char *sprop;
const u32 *iprop;
/* We are only interested in SSIs with a codec phandle in them,
* so let's make sure this SSI has one. The MPC8610 HPCD only
* knows about the CS4270 codec, so reject anything else.
*/
codec_np = get_node_by_phandle_name(np, "codec-handle",
"cirrus,cs4270");
/* Find the codec node for this SSI. */
codec_np = of_parse_phandle(np, "codec-handle", 0);
if (!codec_np) {
dev_err(dev, "invalid codec node\n");
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册