diff options
author | Shengjiu Wang <shengjiu.wang@freescale.com> | 2014-10-13 11:26:02 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:22:54 +0800 |
commit | dd72451a6204099ccb1b3d2f2a9ade8c0ba51eb8 (patch) | |
tree | da808b25c0b714cb0a5d6d1ba14a9ef8378a4e36 /sound/soc/fsl/imx-si476x.c | |
parent | ca64660838d98ab28e4c6fcfdc22a1a77923fb0f (diff) |
MLK-9684-2: ASoC: imx-si476x: remove the codec_name, use the codec_of_node
As the codec_name has a suffix, which is a index and is different
for different platform or different kernel. So here change machine driver
to use codec_of_node, which can be same for different platform/kernel,
then we can maintain a same machine driver for fm.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit e87b135f34cba5cfcd0614b045d4035118fb6d77)
(cherry picked from commit b1dc86a327d96e431c2a55cc6744c6c3bc6b84af)
Diffstat (limited to 'sound/soc/fsl/imx-si476x.c')
-rw-r--r-- | sound/soc/fsl/imx-si476x.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/fsl/imx-si476x.c b/sound/soc/fsl/imx-si476x.c index 58e8a424c0b2..073f3ad13c97 100644 --- a/sound/soc/fsl/imx-si476x.c +++ b/sound/soc/fsl/imx-si476x.c @@ -81,7 +81,6 @@ static struct snd_soc_dai_link imx_dai = { .name = "imx-si476x", .stream_name = "imx-si476x", .codec_dai_name = "si476x-codec", - .codec_name = "si476x-codec.355", .ops = &imx_si476x_ops, }; @@ -134,8 +133,8 @@ static int imx_si476x_probe(struct platform_device *pdev) goto end; } - fm_dev = of_find_i2c_device_by_node(fm_np); - if (!fm_dev) { + fm_dev = of_find_i2c_device_by_node(fm_np->parent); + if (!fm_dev || !fm_dev->dev.driver) { dev_err(&pdev->dev, "failed to find FM platform device\n"); ret = -EINVAL; goto end; @@ -144,6 +143,7 @@ static int imx_si476x_probe(struct platform_device *pdev) card->dev = &pdev->dev; card->dai_link->cpu_dai_name = dev_name(&ssi_pdev->dev); card->dai_link->platform_of_node = ssi_np; + card->dai_link->codec_of_node = fm_np; platform_set_drvdata(pdev, card); |