From: Lars-Peter Clausen Date: Tue, 22 Apr 2014 20:46:34 +0000 (+0200) Subject: ASoC: qi_lb60: Use devm_snd_soc_register_card() X-Git-Tag: next-20140428~41^2~1^4~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=050f62e4de52901cc0f7aebbd64876d2639a8657;p=karo-tx-linux.git ASoC: qi_lb60: Use devm_snd_soc_register_card() Makes the code a bit shorter and will also allow us to remove the drivers remove() callback eventually. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- diff --git a/sound/soc/jz4740/qi_lb60.c b/sound/soc/jz4740/qi_lb60.c index 72ce103f7d68..be0a437f0888 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; }