Skip to content

Commit

Permalink
ASoC: qi_lb60: Use devm_snd_soc_register_card()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Apr 22, 2014
1 parent 0e746d7 commit 050f62e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sound/soc/jz4740/qi_lb60.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down

0 comments on commit 050f62e

Please sign in to comment.