diff options
| author | Robert Jarzmik <robert.jarzmik@free.fr> | 2012-06-30 13:25:08 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-01 14:31:52 -0400 |
| commit | 890255e704826a20caec54dcec1926316baf4263 (patch) | |
| tree | 7585d0c61717eeef2b4830bb1a4da10c688e8bb1 | |
| parent | c9fe573a6584034670c1a55ee8162d623519cbbf (diff) | |
ASoC: mioa701: convert to snd_soc_register_card API
The mioa701 board code is converted to the snd_soc_register_card()
and snd_soc_unregister_card() APIs.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| -rw-r--r-- | sound/soc/pxa/mioa701_wm9713.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c index 9c585af59b5f..8687c1c65d29 100644 --- a/sound/soc/pxa/mioa701_wm9713.c +++ b/sound/soc/pxa/mioa701_wm9713.c | |||
| @@ -186,36 +186,27 @@ static struct snd_soc_card mioa701 = { | |||
| 186 | .num_links = ARRAY_SIZE(mioa701_dai), | 186 | .num_links = ARRAY_SIZE(mioa701_dai), |
| 187 | }; | 187 | }; |
| 188 | 188 | ||
| 189 | static struct platform_device *mioa701_snd_device; | 189 | static int __devinit mioa701_wm9713_probe(struct platform_device *pdev) |
| 190 | |||
| 191 | static int mioa701_wm9713_probe(struct platform_device *pdev) | ||
| 192 | { | 190 | { |
| 193 | int ret; | 191 | int rc; |
| 194 | 192 | ||
| 195 | if (!machine_is_mioa701()) | 193 | if (!machine_is_mioa701()) |
| 196 | return -ENODEV; | 194 | return -ENODEV; |
| 197 | 195 | ||
| 198 | dev_warn(&pdev->dev, "Be warned that incorrect mixers/muxes setup will" | 196 | mioa701.dev = &pdev->dev; |
| 199 | "lead to overheating and possible destruction of your device." | 197 | rc = snd_soc_register_card(&mioa701); |
| 200 | "Do not use without a good knowledge of mio's board design!\n"); | 198 | if (!rc) |
| 201 | 199 | dev_warn(&pdev->dev, "Be warned that incorrect mixers/muxes setup will" | |
| 202 | mioa701_snd_device = platform_device_alloc("soc-audio", -1); | 200 | "lead to overheating and possible destruction of your device." |
| 203 | if (!mioa701_snd_device) | 201 | " Do not use without a good knowledge of mio's board design!\n"); |
| 204 | return -ENOMEM; | 202 | return rc; |
| 205 | |||
| 206 | platform_set_drvdata(mioa701_snd_device, &mioa701); | ||
| 207 | |||
| 208 | ret = platform_device_add(mioa701_snd_device); | ||
| 209 | if (!ret) | ||
| 210 | return 0; | ||
| 211 | |||
| 212 | platform_device_put(mioa701_snd_device); | ||
| 213 | return ret; | ||
| 214 | } | 203 | } |
| 215 | 204 | ||
| 216 | static int __devexit mioa701_wm9713_remove(struct platform_device *pdev) | 205 | static int __devexit mioa701_wm9713_remove(struct platform_device *pdev) |
| 217 | { | 206 | { |
| 218 | platform_device_unregister(mioa701_snd_device); | 207 | struct snd_soc_card *card = platform_get_drvdata(pdev); |
| 208 | |||
| 209 | snd_soc_unregister_card(card); | ||
| 219 | return 0; | 210 | return 0; |
| 220 | } | 211 | } |
| 221 | 212 | ||
