提交 050f62e4 编写于 作者: L Lars-Peter Clausen 提交者: Mark Brown

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: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 0e746d7b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册