diff options
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r-- | sound/soc/pxa/e740_wm9705.c | 20 | ||||
-rw-r--r-- | sound/soc/pxa/e750_wm9705.c | 14 | ||||
-rw-r--r-- | sound/soc/pxa/e800_wm9712.c | 20 | ||||
-rw-r--r-- | sound/soc/pxa/hx4700.c | 13 | ||||
-rw-r--r-- | sound/soc/pxa/mioa701_wm9713.c | 13 | ||||
-rw-r--r-- | sound/soc/pxa/palm27x.c | 13 | ||||
-rw-r--r-- | sound/soc/pxa/pxa-ssp.c | 14 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-ac97.c | 18 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-i2s.c | 2 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-pcm.c | 12 |
10 files changed, 29 insertions, 110 deletions
diff --git a/sound/soc/pxa/e740_wm9705.c b/sound/soc/pxa/e740_wm9705.c index 35ed7eb8cff2..818dc57b0b2f 100644 --- a/sound/soc/pxa/e740_wm9705.c +++ b/sound/soc/pxa/e740_wm9705.c @@ -146,29 +146,21 @@ static int __init e740_init(void) if (!machine_is_e740()) return -ENODEV; - ret = gpio_request(GPIO_E740_MIC_ON, "Mic amp"); + /* Disable audio */ + ret = gpio_request_one(GPIO_E740_MIC_ON, GPIOF_OUT_INIT_LOW, "Mic amp"); if (ret) return ret; - ret = gpio_request(GPIO_E740_AMP_ON, "Output amp"); + ret = gpio_request_one(GPIO_E740_AMP_ON, GPIOF_OUT_INIT_LOW, + "Output amp"); if (ret) goto free_mic_amp_gpio; - ret = gpio_request(GPIO_E740_WM9705_nAVDD2, "Audio power"); + ret = gpio_request_one(GPIO_E740_WM9705_nAVDD2, GPIOF_OUT_INIT_HIGH, + "Audio power"); if (ret) goto free_op_amp_gpio; - /* Disable audio */ - ret = gpio_direction_output(GPIO_E740_MIC_ON, 0); - if (ret) - goto free_apwr_gpio; - ret = gpio_direction_output(GPIO_E740_AMP_ON, 0); - if (ret) - goto free_apwr_gpio; - ret = gpio_direction_output(GPIO_E740_WM9705_nAVDD2, 1); - if (ret) - goto free_apwr_gpio; - e740_snd_device = platform_device_alloc("soc-audio", -1); if (!e740_snd_device) { ret = -ENOMEM; diff --git a/sound/soc/pxa/e750_wm9705.c b/sound/soc/pxa/e750_wm9705.c index ce5f056009a7..55c53d13bea6 100644 --- a/sound/soc/pxa/e750_wm9705.c +++ b/sound/soc/pxa/e750_wm9705.c @@ -129,22 +129,16 @@ static int __init e750_init(void) if (!machine_is_e750()) return -ENODEV; - ret = gpio_request(GPIO_E750_HP_AMP_OFF, "Headphone amp"); + ret = gpio_request_one(GPIO_E750_HP_AMP_OFF, GPIOF_OUT_INIT_HIGH, + "Headphone amp"); if (ret) return ret; - ret = gpio_request(GPIO_E750_SPK_AMP_OFF, "Speaker amp"); + ret = gpio_request_one(GPIO_E750_SPK_AMP_OFF, GPIOF_OUT_INIT_HIGH, + "Speaker amp"); if (ret) goto free_hp_amp_gpio; - ret = gpio_direction_output(GPIO_E750_HP_AMP_OFF, 1); - if (ret) - goto free_spk_amp_gpio; - - ret = gpio_direction_output(GPIO_E750_SPK_AMP_OFF, 1); - if (ret) - goto free_spk_amp_gpio; - e750_snd_device = platform_device_alloc("soc-audio", -1); if (!e750_snd_device) { ret = -ENOMEM; diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c index 6a8f38b6c379..478ff191ffb4 100644 --- a/sound/soc/pxa/e800_wm9712.c +++ b/sound/soc/pxa/e800_wm9712.c @@ -119,25 +119,21 @@ static int __init e800_init(void) if (!machine_is_e800()) return -ENODEV; - ret = gpio_request(GPIO_E800_HP_AMP_OFF, "Headphone amp"); + ret = gpio_request_one(GPIO_E800_HP_AMP_OFF, GPIOF_OUT_INIT_HIGH, + "Headphone amp"); if (ret) return ret; - ret = gpio_request(GPIO_E800_SPK_AMP_ON, "Speaker amp"); + ret = gpio_request_one(GPIO_E800_SPK_AMP_ON, GPIOF_OUT_INIT_HIGH, + "Speaker amp"); if (ret) goto free_hp_amp_gpio; - ret = gpio_direction_output(GPIO_E800_HP_AMP_OFF, 1); - if (ret) - goto free_spk_amp_gpio; - - ret = gpio_direction_output(GPIO_E800_SPK_AMP_ON, 1); - if (ret) - goto free_spk_amp_gpio; - e800_snd_device = platform_device_alloc("soc-audio", -1); - if (!e800_snd_device) - return -ENOMEM; + if (!e800_snd_device) { + ret = -ENOMEM; + goto free_spk_amp_gpio; + } platform_set_drvdata(e800_snd_device, &e800); ret = platform_device_add(e800_snd_device); diff --git a/sound/soc/pxa/hx4700.c b/sound/soc/pxa/hx4700.c index c664e33fb6d7..03ef9f393434 100644 --- a/sound/soc/pxa/hx4700.c +++ b/sound/soc/pxa/hx4700.c @@ -237,18 +237,7 @@ static struct platform_driver hx4700_audio_driver = { .remove = __devexit_p(hx4700_audio_remove), }; -static int __init hx4700_modinit(void) -{ - return platform_driver_register(&hx4700_audio_driver); -} -module_init(hx4700_modinit); - -static void __exit hx4700_modexit(void) -{ - platform_driver_unregister(&hx4700_audio_driver); -} - -module_exit(hx4700_modexit); +module_platform_driver(hx4700_audio_driver); MODULE_AUTHOR("Philipp Zabel"); MODULE_DESCRIPTION("ALSA SoC iPAQ hx4700"); diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c index 0b8d1ee738a4..0e73a7f718e4 100644 --- a/sound/soc/pxa/mioa701_wm9713.c +++ b/sound/soc/pxa/mioa701_wm9713.c @@ -227,18 +227,7 @@ static struct platform_driver mioa701_wm9713_driver = { }, }; -static int __init mioa701_asoc_init(void) -{ - return platform_driver_register(&mioa701_wm9713_driver); -} - -static void __exit mioa701_asoc_exit(void) -{ - platform_driver_unregister(&mioa701_wm9713_driver); -} - -module_init(mioa701_asoc_init); -module_exit(mioa701_asoc_exit); +module_platform_driver(mioa701_wm9713_driver); /* Module information */ MODULE_AUTHOR("Robert Jarzmik (rjarzmik@free.fr)"); diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c index 7edc1fb71fae..f313eca40fdc 100644 --- a/sound/soc/pxa/palm27x.c +++ b/sound/soc/pxa/palm27x.c @@ -201,18 +201,7 @@ static struct platform_driver palm27x_wm9712_driver = { }, }; -static int __init palm27x_asoc_init(void) -{ - return platform_driver_register(&palm27x_wm9712_driver); -} - -static void __exit palm27x_asoc_exit(void) -{ - platform_driver_unregister(&palm27x_wm9712_driver); -} - -module_init(palm27x_asoc_init); -module_exit(palm27x_asoc_exit); +module_platform_driver(palm27x_wm9712_driver); /* Module information */ MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index 8ad93ee2e92b..a57cfbc038e3 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c @@ -771,7 +771,7 @@ static int pxa_ssp_remove(struct snd_soc_dai *dai) SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops pxa_ssp_dai_ops = { +static const struct snd_soc_dai_ops pxa_ssp_dai_ops = { .startup = pxa_ssp_startup, .shutdown = pxa_ssp_shutdown, .trigger = pxa_ssp_trigger, @@ -825,17 +825,7 @@ static struct platform_driver asoc_ssp_driver = { .remove = __devexit_p(asoc_ssp_remove), }; -static int __init pxa_ssp_init(void) -{ - return platform_driver_register(&asoc_ssp_driver); -} -module_init(pxa_ssp_init); - -static void __exit pxa_ssp_exit(void) -{ - platform_driver_unregister(&asoc_ssp_driver); -} -module_exit(pxa_ssp_exit); +module_platform_driver(asoc_ssp_driver); /* Module information */ MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index ac51c6d25c42..837ff341fd6d 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c @@ -163,15 +163,15 @@ static int pxa2xx_ac97_hw_mic_params(struct snd_pcm_substream *substream, SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \ SNDRV_PCM_RATE_48000) -static struct snd_soc_dai_ops pxa_ac97_hifi_dai_ops = { +static const struct snd_soc_dai_ops pxa_ac97_hifi_dai_ops = { .hw_params = pxa2xx_ac97_hw_params, }; -static struct snd_soc_dai_ops pxa_ac97_aux_dai_ops = { +static const struct snd_soc_dai_ops pxa_ac97_aux_dai_ops = { .hw_params = pxa2xx_ac97_hw_aux_params, }; -static struct snd_soc_dai_ops pxa_ac97_mic_dai_ops = { +static const struct snd_soc_dai_ops pxa_ac97_mic_dai_ops = { .hw_params = pxa2xx_ac97_hw_mic_params, }; @@ -263,17 +263,7 @@ static struct platform_driver pxa2xx_ac97_driver = { }, }; -static int __init pxa_ac97_init(void) -{ - return platform_driver_register(&pxa2xx_ac97_driver); -} -module_init(pxa_ac97_init); - -static void __exit pxa_ac97_exit(void) -{ - platform_driver_unregister(&pxa2xx_ac97_driver); -} -module_exit(pxa_ac97_exit); +module_platform_driver(pxa2xx_ac97_driver); MODULE_AUTHOR("Nicolas Pitre"); MODULE_DESCRIPTION("AC97 driver for the Intel PXA2xx chip"); diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c index 11be5952a506..609abd51e55f 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c @@ -331,7 +331,7 @@ static int pxa2xx_i2s_remove(struct snd_soc_dai *dai) SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000) -static struct snd_soc_dai_ops pxa_i2s_dai_ops = { +static const struct snd_soc_dai_ops pxa_i2s_dai_ops = { .startup = pxa2xx_i2s_startup, .shutdown = pxa2xx_i2s_shutdown, .trigger = pxa2xx_i2s_trigger, diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c index 600676f709a9..fdd6bedef9bd 100644 --- a/sound/soc/pxa/pxa2xx-pcm.c +++ b/sound/soc/pxa/pxa2xx-pcm.c @@ -141,17 +141,7 @@ static struct platform_driver pxa_pcm_driver = { .remove = __devexit_p(pxa2xx_soc_platform_remove), }; -static int __init snd_pxa_pcm_init(void) -{ - return platform_driver_register(&pxa_pcm_driver); -} -module_init(snd_pxa_pcm_init); - -static void __exit snd_pxa_pcm_exit(void) -{ - platform_driver_unregister(&pxa_pcm_driver); -} -module_exit(snd_pxa_pcm_exit); +module_platform_driver(pxa_pcm_driver); MODULE_AUTHOR("Nicolas Pitre"); MODULE_DESCRIPTION("Intel PXA2xx PCM DMA module"); |