diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-03-15 07:37:22 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-03-15 07:37:22 +0100 |
commit | 828006de1bddf83b6ecf03ec459c15f7c7c22db7 (patch) | |
tree | 73a224bf0371b41c9777c2bad8169ed50bcca879 /sound/soc/imx | |
parent | d0f47ff17f29740eabbd64e11705b7332241714c (diff) | |
parent | 5ec65ee589fdaca7298b6303fd74ad6c121a8f38 (diff) | |
download | lwn-828006de1bddf83b6ecf03ec459c15f7c7c22db7.tar.gz lwn-828006de1bddf83b6ecf03ec459c15f7c7c22db7.zip |
Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into topic/asoc
Linus decided to go for another week so here's a few more updates - a
mixed bag here, a few minor diagnostic tweaks, some driver enhancements
and the dmaengine conversion for ep93xx drivers which was tested a while
ago and just waiting for a signoff.
Diffstat (limited to 'sound/soc/imx')
-rw-r--r-- | sound/soc/imx/imx-audmux.c | 8 | ||||
-rw-r--r-- | sound/soc/imx/mx27vis-aic32x4.c | 41 |
2 files changed, 26 insertions, 23 deletions
diff --git a/sound/soc/imx/imx-audmux.c b/sound/soc/imx/imx-audmux.c index b83699d905bb..a839494c5ea8 100644 --- a/sound/soc/imx/imx-audmux.c +++ b/sound/soc/imx/imx-audmux.c @@ -167,7 +167,7 @@ static void __init audmux_debugfs_init(void) } } -static void __exit audmux_debugfs_remove(void) +static void __devexit audmux_debugfs_remove(void) { debugfs_remove_recursive(audmux_debugfs_root); } @@ -249,7 +249,7 @@ int imx_audmux_v2_configure_port(unsigned int port, unsigned int ptcr, } EXPORT_SYMBOL_GPL(imx_audmux_v2_configure_port); -static int __init imx_audmux_probe(struct platform_device *pdev) +static int __devinit imx_audmux_probe(struct platform_device *pdev) { struct resource *res; const struct of_device_id *of_id = @@ -276,7 +276,7 @@ static int __init imx_audmux_probe(struct platform_device *pdev) return 0; } -static int __exit imx_audmux_remove(struct platform_device *pdev) +static int __devexit imx_audmux_remove(struct platform_device *pdev) { if (audmux_type == IMX31_AUDMUX) audmux_debugfs_remove(); @@ -287,7 +287,7 @@ static int __exit imx_audmux_remove(struct platform_device *pdev) static struct platform_driver imx_audmux_driver = { .probe = imx_audmux_probe, - .remove = __exit_p(imx_audmux_remove), + .remove = __devexit_p(imx_audmux_remove), .id_table = imx_audmux_ids, .driver = { .name = DRIVER_NAME, diff --git a/sound/soc/imx/mx27vis-aic32x4.c b/sound/soc/imx/mx27vis-aic32x4.c index 976f857151f0..f6d04ad4bb39 100644 --- a/sound/soc/imx/mx27vis-aic32x4.c +++ b/sound/soc/imx/mx27vis-aic32x4.c @@ -188,22 +188,16 @@ static struct snd_soc_card mx27vis_aic32x4 = { .num_dapm_routes = ARRAY_SIZE(aic32x4_dapm_routes), }; -static struct platform_device *mx27vis_aic32x4_snd_device; - -static int __init mx27vis_aic32x4_init(void) +static int __devinit mx27vis_aic32x4_probe(struct platform_device *pdev) { int ret; - mx27vis_aic32x4_snd_device = platform_device_alloc("soc-audio", -1); - if (!mx27vis_aic32x4_snd_device) - return -ENOMEM; - - platform_set_drvdata(mx27vis_aic32x4_snd_device, &mx27vis_aic32x4); - ret = platform_device_add(mx27vis_aic32x4_snd_device); - + mx27vis_aic32x4.dev = &pdev->dev; + ret = snd_soc_register_card(&mx27vis_aic32x4); if (ret) { - printk(KERN_ERR "ASoC: Platform device allocation failed\n"); - platform_device_put(mx27vis_aic32x4_snd_device); + dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", + ret); + return ret; } /* Connect SSI0 as clock slave to SSI1 external pins */ @@ -221,22 +215,31 @@ static int __init mx27vis_aic32x4_init(void) ret = mxc_gpio_setup_multiple_pins(mx27vis_amp_pins, ARRAY_SIZE(mx27vis_amp_pins), "MX27VIS_AMP"); - if (ret) { + if (ret) printk(KERN_ERR "ASoC: unable to setup gpios\n"); - platform_device_put(mx27vis_aic32x4_snd_device); - } return ret; } -static void __exit mx27vis_aic32x4_exit(void) +static int __devexit mx27vis_aic32x4_remove(struct platform_device *pdev) { - platform_device_unregister(mx27vis_aic32x4_snd_device); + snd_soc_unregister_card(&mx27vis_aic32x4); + + return 0; } -module_init(mx27vis_aic32x4_init); -module_exit(mx27vis_aic32x4_exit); +static struct platform_driver mx27vis_aic32x4_audio_driver = { + .driver = { + .name = "mx27vis", + .owner = THIS_MODULE, + }, + .probe = mx27vis_aic32x4_probe, + .remove = __devexit_p(mx27vis_aic32x4_remove), +}; + +module_platform_driver(mx27vis_aic32x4_audio_driver); MODULE_AUTHOR("Javier Martin <javier.martin@vista-silicon.com>"); MODULE_DESCRIPTION("ALSA SoC AIC32X4 mx27 visstrim"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:mx27vis"); |