MLK-21441: ASoC: imx-audmix: register the card on a proper dev
authorViorel Suman <viorel.suman@nxp.com>
Mon, 15 Apr 2019 12:46:47 +0000 (15:46 +0300)
committerLeonard Crestez <leonard.crestez@nxp.com>
Thu, 18 Apr 2019 00:00:38 +0000 (03:00 +0300)
Register the card on a proper dev pointer.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
sound/soc/fsl/imx-audmix.c

index 9aaf3e5..a794c4d 100644 (file)
@@ -300,16 +300,16 @@ static int imx_audmix_probe(struct platform_device *pdev)
        priv->card.num_configs = priv->num_dai_conf;
        priv->card.dapm_routes = priv->dapm_routes;
        priv->card.num_dapm_routes = priv->num_dapm_routes;
-       priv->card.dev = pdev->dev.parent;
+       priv->card.dev = &pdev->dev;
        priv->card.owner = THIS_MODULE;
        priv->card.name = "imx-audmix";
 
        platform_set_drvdata(pdev, &priv->card);
        snd_soc_card_set_drvdata(&priv->card, priv);
 
-       ret = devm_snd_soc_register_card(pdev->dev.parent, &priv->card);
+       ret = devm_snd_soc_register_card(&pdev->dev, &priv->card);
        if (ret) {
-               dev_err(&pdev->dev, "snd_soc_register_card failed\n");
+               dev_err(&pdev->dev, "snd_soc_register_card failed: %d\n", ret);
                return ret;
        }