diff options
author | Shengjiu Wang <shengjiu.wang@nxp.com> | 2019-09-23 17:53:30 +0800 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 15:50:58 +0800 |
commit | eb5f47207d1a5b5db1baf447b7cb948ffae27bc6 (patch) | |
tree | 1228fa4ba002e724e81938a79605175b5f566897 /sound/soc | |
parent | cdb2a067d955470095d4a36589561eaf881ac6fa (diff) |
ASoC: imx-sii902x: Fix compile error
API change due to:
adb76b5b9c47 ("ASoC: soc-core: remove legacy style dai_link")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/fsl/imx-sii902x.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sound/soc/fsl/imx-sii902x.c b/sound/soc/fsl/imx-sii902x.c index a282fb684e05..d4b18e0fdf06 100644 --- a/sound/soc/fsl/imx-sii902x.c +++ b/sound/soc/fsl/imx-sii902x.c @@ -127,8 +127,13 @@ static int imx_sii902x_probe(struct platform_device *pdev) struct device_node *cpu_np, *sii902x_np = NULL; struct platform_device *cpu_pdev; struct imx_sii902x_data *data; + struct snd_soc_dai_link_component *dlc; int ret; + dlc = devm_kzalloc(&pdev->dev, 3 * sizeof(*dlc), GFP_KERNEL); + if (!dlc) + return -ENOMEM; + cpu_np = of_parse_phandle(pdev->dev.of_node, "cpu-dai", 0); if (!cpu_np) { dev_err(&pdev->dev, "cpu dai phandle missing or invalid\n"); @@ -149,12 +154,19 @@ static int imx_sii902x_probe(struct platform_device *pdev) goto fail; } + data->dai.cpus = &dlc[0]; + data->dai.num_cpus = 1; + data->dai.platforms = &dlc[1]; + data->dai.num_platforms = 1; + data->dai.codecs = &dlc[2]; + data->dai.num_codecs = 1; + data->dai.name = "sii902x hdmi"; data->dai.stream_name = "sii902x hdmi"; - data->dai.codec_dai_name = "i2s-hifi"; - data->dai.codec_name = "hdmi-audio-codec.1"; - data->dai.cpu_dai_name = dev_name(&cpu_pdev->dev); - data->dai.platform_of_node = cpu_np; + data->dai.codecs->dai_name = "i2s-hifi"; + data->dai.codecs->name = "hdmi-audio-codec.1"; + data->dai.cpus->dai_name = dev_name(&cpu_pdev->dev); + data->dai.platforms->of_node = cpu_np; data->dai.ops = &imx_sii902x_ops; data->dai.playback_only = true; data->dai.capture_only = false; |