]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: fsl: align mpc8610_hpcd with p1022_ds on getting codec node
authorShawn Guo <shawn.guo@linaro.org>
Fri, 24 Feb 2012 14:09:37 +0000 (22:09 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 28 Feb 2012 12:35:08 +0000 (12:35 +0000)
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>
sound/soc/fsl/mpc8610_hpcd.c

index 15e06e9d362c7e0d2cde05de054d20d7f4c9f748..93256b39ccb6cf3bebad352e6f9b332870959116 100644 (file)
@@ -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;