* [PATCH] mioa701 convert to snd_soc_register_card API
@ 2012-06-30 17:25 Robert Jarzmik
2012-07-01 18:33 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Robert Jarzmik @ 2012-06-30 17:25 UTC (permalink / raw)
To: broonie, lrg; +Cc: alsa-devel, Robert Jarzmik
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>
---
sound/soc/pxa/mioa701_wm9713.c | 33 ++++++++++++---------------------
1 file changed, 12 insertions(+), 21 deletions(-)
diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c
index 9c585af..8687c1c 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 = {
.num_links = ARRAY_SIZE(mioa701_dai),
};
-static struct platform_device *mioa701_snd_device;
-
-static int mioa701_wm9713_probe(struct platform_device *pdev)
+static int __devinit mioa701_wm9713_probe(struct platform_device *pdev)
{
- int ret;
+ int rc;
if (!machine_is_mioa701())
return -ENODEV;
- dev_warn(&pdev->dev, "Be warned that incorrect mixers/muxes setup will"
- "lead to overheating and possible destruction of your device."
- "Do not use without a good knowledge of mio's board design!\n");
-
- mioa701_snd_device = platform_device_alloc("soc-audio", -1);
- if (!mioa701_snd_device)
- return -ENOMEM;
-
- platform_set_drvdata(mioa701_snd_device, &mioa701);
-
- ret = platform_device_add(mioa701_snd_device);
- if (!ret)
- return 0;
-
- platform_device_put(mioa701_snd_device);
- return ret;
+ mioa701.dev = &pdev->dev;
+ rc = snd_soc_register_card(&mioa701);
+ if (!rc)
+ dev_warn(&pdev->dev, "Be warned that incorrect mixers/muxes setup will"
+ "lead to overheating and possible destruction of your device."
+ " Do not use without a good knowledge of mio's board design!\n");
+ return rc;
}
static int __devexit mioa701_wm9713_remove(struct platform_device *pdev)
{
- platform_device_unregister(mioa701_snd_device);
+ struct snd_soc_card *card = platform_get_drvdata(pdev);
+
+ snd_soc_unregister_card(card);
return 0;
}
--
1.7.10
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mioa701 convert to snd_soc_register_card API
2012-06-30 17:25 [PATCH] mioa701 convert to snd_soc_register_card API Robert Jarzmik
@ 2012-07-01 18:33 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-07-01 18:33 UTC (permalink / raw)
To: Robert Jarzmik; +Cc: alsa-devel, lrg
[-- Attachment #1.1: Type: text/plain, Size: 285 bytes --]
On Sat, Jun 30, 2012 at 07:25:08PM +0200, Robert Jarzmik wrote:
> The mioa701 board code is converted to the snd_soc_register_card()
> and snd_soc_unregister_card() APIs.
Applied, thanks, but please do try to use subject lines appropriate for
the subsystem you're submitting against.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-01 18:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-30 17:25 [PATCH] mioa701 convert to snd_soc_register_card API Robert Jarzmik
2012-07-01 18:33 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.