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:
parent
9194cb7c75
commit
352ad24ecb
|
@ -148,6 +148,10 @@ static int fsl_dai_probe(struct platform_device *pdev)
|
|||
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,
|
||||
sizeof(*priv->pd_dev), GFP_KERNEL);
|
||||
if (!priv->pd_dev)
|
||||
|
@ -176,6 +180,7 @@ static int fsl_dai_probe(struct platform_device *pdev)
|
|||
}
|
||||
}
|
||||
|
||||
done_pm:
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/* 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,
|
||||
sizeof(*priv->pd_dev), GFP_KERNEL);
|
||||
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);
|
||||
if (ret) {
|
||||
dev_err(sdev->dev, "Cannot obtain SCU handle (err = %d)\n",
|
||||
|
|
Loading…
Reference in New Issue