mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
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>
This commit is contained in:
parent
c9fe573a65
commit
890255e704
@ -186,36 +186,27 @@ static struct snd_soc_card mioa701 = {
|
|||||||
.num_links = ARRAY_SIZE(mioa701_dai),
|
.num_links = ARRAY_SIZE(mioa701_dai),
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device *mioa701_snd_device;
|
static int __devinit mioa701_wm9713_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
static int mioa701_wm9713_probe(struct platform_device *pdev)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int rc;
|
||||||
|
|
||||||
if (!machine_is_mioa701())
|
if (!machine_is_mioa701())
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
dev_warn(&pdev->dev, "Be warned that incorrect mixers/muxes setup will"
|
mioa701.dev = &pdev->dev;
|
||||||
"lead to overheating and possible destruction of your device."
|
rc = snd_soc_register_card(&mioa701);
|
||||||
"Do not use without a good knowledge of mio's board design!\n");
|
if (!rc)
|
||||||
|
dev_warn(&pdev->dev, "Be warned that incorrect mixers/muxes setup will"
|
||||||
mioa701_snd_device = platform_device_alloc("soc-audio", -1);
|
"lead to overheating and possible destruction of your device."
|
||||||
if (!mioa701_snd_device)
|
" Do not use without a good knowledge of mio's board design!\n");
|
||||||
return -ENOMEM;
|
return rc;
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __devexit mioa701_wm9713_remove(struct platform_device *pdev)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user