static int asoc_mmp_sspa_probe(struct platform_device *pdev)
{
struct sspa_priv *sspa;
+ int ret;
sspa = devm_kzalloc(&pdev->dev,
sizeof(struct sspa_priv), GFP_KERNEL);
return PTR_ERR(sspa->sysclk);
}
}
- pm_runtime_enable(&pdev->dev);
- clk_prepare_enable(sspa->audio_clk);
platform_set_drvdata(pdev, sspa);
sspa->playback_dma_data.maxburst = 4;
sspa->playback_dma_data.addr = 0x80 + SSPA_D;
if (pdev->dev.of_node) {
- int ret;
-
ret = devm_snd_dmaengine_pcm_register(&pdev->dev,
&mmp_pcm_config, 0);
if (ret)
return ret;
}
- return devm_snd_soc_register_component(&pdev->dev, &mmp_sspa_component,
- &mmp_sspa_dai, 1);
+ ret = devm_snd_soc_register_component(&pdev->dev, &mmp_sspa_component,
+ &mmp_sspa_dai, 1);
+ if (ret)
+ return ret;
+
+ pm_runtime_enable(&pdev->dev);
+ clk_prepare_enable(sspa->audio_clk);
+
+ return 0;
}
static int asoc_mmp_sspa_remove(struct platform_device *pdev)