aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/pxa/e800_wm9712.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/pxa/e800_wm9712.c')
-rw-r--r--sound/soc/pxa/e800_wm9712.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c
index 6a8f38b6c37..478ff191ffb 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);