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: Shawn Guo <shawn.guo@linaro.org> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
fb1a6453bc
commit
7c59bc55e4
1 changed files with 2 additions and 6 deletions
|
@ -336,12 +336,8 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev)
|
||||||
const char *sprop;
|
const char *sprop;
|
||||||
const u32 *iprop;
|
const u32 *iprop;
|
||||||
|
|
||||||
/* We are only interested in SSIs with a codec phandle in them,
|
/* Find the codec node for this SSI. */
|
||||||
* so let's make sure this SSI has one. The MPC8610 HPCD only
|
codec_np = of_parse_phandle(np, "codec-handle", 0);
|
||||||
* knows about the CS4270 codec, so reject anything else.
|
|
||||||
*/
|
|
||||||
codec_np = get_node_by_phandle_name(np, "codec-handle",
|
|
||||||
"cirrus,cs4270");
|
|
||||||
if (!codec_np) {
|
if (!codec_np) {
|
||||||
dev_err(dev, "invalid codec node\n");
|
dev_err(dev, "invalid codec node\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in a new issue