diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-02-24 09:09:37 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-28 07:35:08 -0500 |
commit | 7c59bc55e476947c1ea8a019e97aa648de53f5a0 (patch) | |
tree | dcd9478da1454ee590320c49044129f1a0b54a60 /sound | |
parent | fb1a6453bc413841876eac2ed1d7fd9e74b118fc (diff) |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/fsl/mpc8610_hpcd.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index 15e06e9d362c..93256b39ccb6 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c | |||
@@ -336,12 +336,8 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) | |||
336 | const char *sprop; | 336 | const char *sprop; |
337 | const u32 *iprop; | 337 | const u32 *iprop; |
338 | 338 | ||
339 | /* We are only interested in SSIs with a codec phandle in them, | 339 | /* Find the codec node for this SSI. */ |
340 | * so let's make sure this SSI has one. The MPC8610 HPCD only | 340 | codec_np = of_parse_phandle(np, "codec-handle", 0); |
341 | * knows about the CS4270 codec, so reject anything else. | ||
342 | */ | ||
343 | codec_np = get_node_by_phandle_name(np, "codec-handle", | ||
344 | "cirrus,cs4270"); | ||
345 | if (!codec_np) { | 341 | if (!codec_np) { |
346 | dev_err(dev, "invalid codec node\n"); | 342 | dev_err(dev, "invalid codec node\n"); |
347 | return -EINVAL; | 343 | return -EINVAL; |