All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, alsa-devel@alsa-project.org,
	Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH 4/6] ASoC: qi_lb60: Use devm_snd_soc_register_card()
Date: Tue, 22 Apr 2014 22:46:34 +0200	[thread overview]
Message-ID: <1398199596-23649-4-git-send-email-lars@metafoo.de> (raw)
In-Reply-To: <1398199596-23649-1-git-send-email-lars@metafoo.de>

Makes the code a bit shorter and will also allow us to remove the drivers
remove() callback eventually.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/jz4740/qi_lb60.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/jz4740/qi_lb60.c b/sound/soc/jz4740/qi_lb60.c
index 72ce103..be0a437 100644
--- a/sound/soc/jz4740/qi_lb60.c
+++ b/sound/soc/jz4740/qi_lb60.c
@@ -86,7 +86,7 @@ static int qi_lb60_probe(struct platform_device *pdev)
 
 	card->dev = &pdev->dev;
 
-	ret = snd_soc_register_card(card);
+	ret = devm_snd_soc_register_card(&pdev->dev, card);
 	if (ret) {
 		dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
 			ret);
@@ -97,9 +97,6 @@ static int qi_lb60_probe(struct platform_device *pdev)
 
 static int qi_lb60_remove(struct platform_device *pdev)
 {
-	struct snd_soc_card *card = platform_get_drvdata(pdev);
-
-	snd_soc_unregister_card(card);
 	gpio_free_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios));
 	return 0;
 }
-- 
1.8.0

  parent reply	other threads:[~2014-04-22 20:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 20:46 [PATCH 1/6] ASoC: jz4740: Remove Makefile entry for removed file Lars-Peter Clausen
2014-04-22 20:46 ` [PATCH 2/6] ASoC: qi_lb60: Set fully_routed flag Lars-Peter Clausen
2014-04-22 20:46 ` [PATCH 3/6] ASoC: qi_lb60: Set .dai_fmt instead of calling snd_soc_set_dai_fmt() Lars-Peter Clausen
2014-04-22 20:46 ` Lars-Peter Clausen [this message]
2014-04-22 20:54   ` [PATCH 4/6] ASoC: qi_lb60: Use devm_snd_soc_register_card() Mark Brown
2014-04-22 22:06     ` Ralf Baechle
2014-04-22 22:06       ` Ralf Baechle
2014-04-22 20:46 ` [PATCH 5/6] ASoC: qi_lb60: Use GPIO descriptor API Lars-Peter Clausen
2014-04-23 11:19   ` Mark Brown
2014-04-23 11:19     ` Mark Brown
2014-04-22 20:46 ` [PATCH 6/6] ASoC: jz4740: Improve build test coverage Lars-Peter Clausen
2014-04-23 11:19   ` Mark Brown
2015-03-27 10:51 ` [PATCH 1/6] ASoC: jz4740: Remove Makefile entry for removed file Markos Chandras
2015-03-27 10:51   ` Markos Chandras
2015-04-03 18:25   ` Greg Kroah-Hartman

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=1398199596-23649-4-git-send-email-lars@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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.