MLK-23350-1 ASoC: sof: Skip power domain handline when num_domains = 1
This case case is already handled by the PM core. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This commit is contained in:
@ -148,6 +148,10 @@ static int fsl_dai_probe(struct platform_device *pdev)
|
|||||||
return priv->num_domains;
|
return priv->num_domains;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* power domain already attached by PM core */
|
||||||
|
if (priv->num_domains == 1)
|
||||||
|
goto done_pm;
|
||||||
|
|
||||||
priv->pd_dev = devm_kmalloc_array(&pdev->dev, priv->num_domains,
|
priv->pd_dev = devm_kmalloc_array(&pdev->dev, priv->num_domains,
|
||||||
sizeof(*priv->pd_dev), GFP_KERNEL);
|
sizeof(*priv->pd_dev), GFP_KERNEL);
|
||||||
if (!priv->pd_dev)
|
if (!priv->pd_dev)
|
||||||
@ -176,6 +180,7 @@ static int fsl_dai_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done_pm:
|
||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
|
|
||||||
ret = devm_snd_soc_register_component(&pdev->dev, &fsl_dai_component,
|
ret = devm_snd_soc_register_component(&pdev->dev, &fsl_dai_component,
|
||||||
|
|||||||
@ -225,6 +225,10 @@ static int imx8_probe(struct snd_sof_dev *sdev)
|
|||||||
return priv->num_domains;
|
return priv->num_domains;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* power domain already enabled by PM core */
|
||||||
|
if (priv->num_domains == 1)
|
||||||
|
goto done_pm;
|
||||||
|
|
||||||
priv->pd_dev = devm_kmalloc_array(&pdev->dev, priv->num_domains,
|
priv->pd_dev = devm_kmalloc_array(&pdev->dev, priv->num_domains,
|
||||||
sizeof(*priv->pd_dev), GFP_KERNEL);
|
sizeof(*priv->pd_dev), GFP_KERNEL);
|
||||||
if (!priv)
|
if (!priv)
|
||||||
@ -252,6 +256,7 @@ static int imx8_probe(struct snd_sof_dev *sdev)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done_pm:
|
||||||
ret = imx_scu_get_handle(&priv->sc_ipc);
|
ret = imx_scu_get_handle(&priv->sc_ipc);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(sdev->dev, "Cannot obtain SCU handle (err = %d)\n",
|
dev_err(sdev->dev, "Cannot obtain SCU handle (err = %d)\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user