@@ -112,19 +112,17 @@ static int e800_probe(struct platform_device *pdev)
struct snd_soc_card *card = &e800;
int ret;
- ret = gpio_request_array(e800_audio_gpios,
- ARRAY_SIZE(e800_audio_gpios));
+ ret = devm_gpio_request_array(&pdev->dev, e800_audio_gpios,
+ ARRAY_SIZE(e800_audio_gpios));
if (ret)
return ret;
card->dev = &pdev->dev;
ret = snd_soc_register_card(card);
- if (ret) {
+ if (ret)
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
ret);
- gpio_free_array(e800_audio_gpios, ARRAY_SIZE(e800_audio_gpios));
- }
return ret;
}
@@ -132,7 +130,6 @@ static int e800_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
- gpio_free_array(e800_audio_gpios, ARRAY_SIZE(e800_audio_gpios));
snd_soc_unregister_card(card);
return 0;
}