All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin Povišer" <povik+lin@cutebit.org>
To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>
Cc: asahi@lists.linux.dev, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org,
	"Martin Povišer" <povik+lin@cutebit.org>
Subject: [PATCH 3/3] ASoC: apple: mca: Adjust timing of component unregister
Date: Tue, 27 Sep 2022 13:34:26 +0200	[thread overview]
Message-ID: <20220927113426.49724-3-povik+lin@cutebit.org> (raw)
In-Reply-To: <20220927113426.49724-1-povik+lin@cutebit.org>

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@cutebit.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


WARNING: multiple messages have this Message-ID (diff)
From: "Martin Povišer" <povik+lin@cutebit.org>
To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>
Cc: "Martin Povišer" <povik+lin@cutebit.org>,
	alsa-devel@alsa-project.org, asahi@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] ASoC: apple: mca: Adjust timing of component unregister
Date: Tue, 27 Sep 2022 13:34:26 +0200	[thread overview]
Message-ID: <20220927113426.49724-3-povik+lin@cutebit.org> (raw)
In-Reply-To: <20220927113426.49724-1-povik+lin@cutebit.org>

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@cutebit.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


  parent reply	other threads:[~2022-09-27 11:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 11:34 [PATCH 1/3] ASoC: apple: mca: Trigger, not deassert, the peripheral reset Martin Povišer
2022-09-27 11:34 ` Martin Povišer
2022-09-27 11:34 ` [PATCH 2/3] ASoC: apple: mca: Remove stale release of DMA channels Martin Povišer
2022-09-27 11:34   ` Martin Povišer
2022-09-27 11:34 ` Martin Povišer [this message]
2022-09-27 11:34   ` [PATCH 3/3] ASoC: apple: mca: Adjust timing of component unregister Martin Povišer
2022-09-27 14:48 ` [PATCH 1/3] ASoC: apple: mca: Trigger, not deassert, the peripheral reset Mark Brown
2022-09-27 14:48   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220927113426.49724-3-povik+lin@cutebit.org \
    --to=povik+lin@cutebit.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=asahi@lists.linux.dev \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.