diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-08-30 05:16:01 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-09-14 13:28:24 -0400 |
commit | 2342cafe2269fe7cccda0aea88e30e8f4bcc075f (patch) | |
tree | 87ef6124cc37f712fc8c73bbb2c5f847cdeb1649 | |
parent | 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff) |
ASoC: au1x: Convert to devm_snd_soc_register_card
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/au1x/db1000.c | 10 | ||||
-rw-r--r-- | sound/soc/au1x/db1200.c | 10 |
2 files changed, 2 insertions, 18 deletions
diff --git a/sound/soc/au1x/db1000.c b/sound/soc/au1x/db1000.c index 452f404abfd2..e97c32798e98 100644 --- a/sound/soc/au1x/db1000.c +++ b/sound/soc/au1x/db1000.c | |||
@@ -38,14 +38,7 @@ static int db1000_audio_probe(struct platform_device *pdev) | |||
38 | { | 38 | { |
39 | struct snd_soc_card *card = &db1000_ac97; | 39 | struct snd_soc_card *card = &db1000_ac97; |
40 | card->dev = &pdev->dev; | 40 | card->dev = &pdev->dev; |
41 | return snd_soc_register_card(card); | 41 | return devm_snd_soc_register_card(&pdev->dev, card); |
42 | } | ||
43 | |||
44 | static int db1000_audio_remove(struct platform_device *pdev) | ||
45 | { | ||
46 | struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
47 | snd_soc_unregister_card(card); | ||
48 | return 0; | ||
49 | } | 42 | } |
50 | 43 | ||
51 | static struct platform_driver db1000_audio_driver = { | 44 | static struct platform_driver db1000_audio_driver = { |
@@ -54,7 +47,6 @@ static struct platform_driver db1000_audio_driver = { | |||
54 | .pm = &snd_soc_pm_ops, | 47 | .pm = &snd_soc_pm_ops, |
55 | }, | 48 | }, |
56 | .probe = db1000_audio_probe, | 49 | .probe = db1000_audio_probe, |
57 | .remove = db1000_audio_remove, | ||
58 | }; | 50 | }; |
59 | 51 | ||
60 | module_platform_driver(db1000_audio_driver); | 52 | module_platform_driver(db1000_audio_driver); |
diff --git a/sound/soc/au1x/db1200.c b/sound/soc/au1x/db1200.c index 58c3164802b8..638ca0ba7e6e 100644 --- a/sound/soc/au1x/db1200.c +++ b/sound/soc/au1x/db1200.c | |||
@@ -174,14 +174,7 @@ static int db1200_audio_probe(struct platform_device *pdev) | |||
174 | 174 | ||
175 | card = db1200_cards[pid->driver_data]; | 175 | card = db1200_cards[pid->driver_data]; |
176 | card->dev = &pdev->dev; | 176 | card->dev = &pdev->dev; |
177 | return snd_soc_register_card(card); | 177 | return devm_snd_soc_register_card(&pdev->dev, card); |
178 | } | ||
179 | |||
180 | static int db1200_audio_remove(struct platform_device *pdev) | ||
181 | { | ||
182 | struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
183 | snd_soc_unregister_card(card); | ||
184 | return 0; | ||
185 | } | 178 | } |
186 | 179 | ||
187 | static struct platform_driver db1200_audio_driver = { | 180 | static struct platform_driver db1200_audio_driver = { |
@@ -191,7 +184,6 @@ static struct platform_driver db1200_audio_driver = { | |||
191 | }, | 184 | }, |
192 | .id_table = db1200_pids, | 185 | .id_table = db1200_pids, |
193 | .probe = db1200_audio_probe, | 186 | .probe = db1200_audio_probe, |
194 | .remove = db1200_audio_remove, | ||
195 | }; | 187 | }; |
196 | 188 | ||
197 | module_platform_driver(db1200_audio_driver); | 189 | module_platform_driver(db1200_audio_driver); |