Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ff7ada7 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

ASoC: Convert e750_wm9705 to use gpio_request_one()

parent c1496b4a
Loading
Loading
Loading
Loading
+4 −10
Original line number Original line Diff line number Diff line
@@ -129,22 +129,16 @@ static int __init e750_init(void)
	if (!machine_is_e750())
	if (!machine_is_e750())
		return -ENODEV;
		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)
	if (ret)
		return 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)
	if (ret)
		goto free_hp_amp_gpio;
		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);
	e750_snd_device = platform_device_alloc("soc-audio", -1);
	if (!e750_snd_device) {
	if (!e750_snd_device) {
		ret = -ENOMEM;
		ret = -ENOMEM;