Skip to content

Commit

Permalink
ASoC: fsl: align mpc8610_hpcd with p1022_ds on getting codec node
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn Guo authored and Mark Brown committed Feb 28, 2012
1 parent fb1a645 commit 7c59bc5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sound/soc/fsl/mpc8610_hpcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7c59bc5

Please sign in to comment.