Commit db6ae79a authored by Martin Povišer's avatar Martin Povišer Committed by Mark Brown

ASoC: apple: mca: Adjust timing of component unregister

On removal of the driver, the ASoC component should be unregistered
first, before we start releasing any of the other resources.

Fixes: 3df5d0d9 ("ASoC: apple: mca: Start new platform driver")
Signed-off-by: default avatarMartin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220927113426.49724-3-povik+lin@cutebit.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent e92e50e4
......@@ -1129,8 +1129,8 @@ static int apple_mca_probe(struct platform_device *pdev)
}
}
ret = devm_snd_soc_register_component(&pdev->dev, &mca_component,
dai_drivers, nclusters * 2);
ret = snd_soc_register_component(&pdev->dev, &mca_component,
dai_drivers, nclusters * 2);
if (ret) {
dev_err(&pdev->dev, "unable to register ASoC component: %d\n",
ret);
......@@ -1148,6 +1148,7 @@ static int apple_mca_remove(struct platform_device *pdev)
{
struct mca_data *mca = platform_get_drvdata(pdev);
snd_soc_unregister_component(&pdev->dev);
apple_mca_release(mca);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment