Commit 2342cafe authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

ASoC: au1x: Convert to devm_snd_soc_register_card

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6ff33f39
...@@ -38,14 +38,7 @@ static int db1000_audio_probe(struct platform_device *pdev) ...@@ -38,14 +38,7 @@ static int db1000_audio_probe(struct platform_device *pdev)
{ {
struct snd_soc_card *card = &db1000_ac97; struct snd_soc_card *card = &db1000_ac97;
card->dev = &pdev->dev; card->dev = &pdev->dev;
return snd_soc_register_card(card); return devm_snd_soc_register_card(&pdev->dev, card);
}
static int db1000_audio_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
snd_soc_unregister_card(card);
return 0;
} }
static struct platform_driver db1000_audio_driver = { static struct platform_driver db1000_audio_driver = {
...@@ -54,7 +47,6 @@ static struct platform_driver db1000_audio_driver = { ...@@ -54,7 +47,6 @@ static struct platform_driver db1000_audio_driver = {
.pm = &snd_soc_pm_ops, .pm = &snd_soc_pm_ops,
}, },
.probe = db1000_audio_probe, .probe = db1000_audio_probe,
.remove = db1000_audio_remove,
}; };
module_platform_driver(db1000_audio_driver); module_platform_driver(db1000_audio_driver);
......
...@@ -174,14 +174,7 @@ static int db1200_audio_probe(struct platform_device *pdev) ...@@ -174,14 +174,7 @@ static int db1200_audio_probe(struct platform_device *pdev)
card = db1200_cards[pid->driver_data]; card = db1200_cards[pid->driver_data];
card->dev = &pdev->dev; card->dev = &pdev->dev;
return snd_soc_register_card(card); return devm_snd_soc_register_card(&pdev->dev, card);
}
static int db1200_audio_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
snd_soc_unregister_card(card);
return 0;
} }
static struct platform_driver db1200_audio_driver = { static struct platform_driver db1200_audio_driver = {
...@@ -191,7 +184,6 @@ static struct platform_driver db1200_audio_driver = { ...@@ -191,7 +184,6 @@ static struct platform_driver db1200_audio_driver = {
}, },
.id_table = db1200_pids, .id_table = db1200_pids,
.probe = db1200_audio_probe, .probe = db1200_audio_probe,
.remove = db1200_audio_remove,
}; };
module_platform_driver(db1200_audio_driver); module_platform_driver(db1200_audio_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment