[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220927113426.49724-3-povik+lin@cutebit.org>
Date: Tue, 27 Sep 2022 13:34:26 +0200
From: Martin Povišer <povik+lin@...ebit.org>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>
Cc: asahi@...ts.linux.dev, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org,
Martin Povišer <povik+lin@...ebit.org>
Subject: [PATCH 3/3] 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: 3df5d0d97289 ("ASoC: apple: mca: Start new platform driver")
Signed-off-by: Martin Povišer <povik+lin@...ebit.org>
---
sound/soc/apple/mca.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/apple/mca.c b/sound/soc/apple/mca.c
index 7ca653987b78..24381c42eb54 100644
--- a/sound/soc/apple/mca.c
+++ b/sound/soc/apple/mca.c
@@ -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;
}
--
2.33.0
Powered by blists - more mailing lists