diff mbox

ASoC: qi_lb60: Pass flags to gpiod_get()

Message ID 1416943780-1016-1-git-send-email-lars@metafoo.de (mailing list archive)
State Accepted
Commit 69b93607a9862b1db2f0f2e078e1396f8e20fa9b
Headers show

Commit Message

Lars-Peter Clausen Nov. 25, 2014, 7:29 p.m. UTC
Pass flags to gpiod_get() to automatically configure the GPIOs. This is shorter
and not passing any flags to gpiod_get() will eventually no longer be supported.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/jz4740/qi_lb60.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

Comments

Mark Brown Nov. 25, 2014, 7:37 p.m. UTC | #1
On Tue, Nov 25, 2014 at 08:29:40PM +0100, Lars-Peter Clausen wrote:
> Pass flags to gpiod_get() to automatically configure the GPIOs. This is shorter
> and not passing any flags to gpiod_get() will eventually no longer be supported.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/jz4740/qi_lb60.c b/sound/soc/jz4740/qi_lb60.c
index 5cb91f9..0fb7d2a 100644
--- a/sound/soc/jz4740/qi_lb60.c
+++ b/sound/soc/jz4740/qi_lb60.c
@@ -77,25 +77,18 @@  static int qi_lb60_probe(struct platform_device *pdev)
 {
 	struct qi_lb60 *qi_lb60;
 	struct snd_soc_card *card = &qi_lb60_card;
-	int ret;
 
 	qi_lb60 = devm_kzalloc(&pdev->dev, sizeof(*qi_lb60), GFP_KERNEL);
 	if (!qi_lb60)
 		return -ENOMEM;
 
-	qi_lb60->snd_gpio = devm_gpiod_get(&pdev->dev, "snd");
+	qi_lb60->snd_gpio = devm_gpiod_get(&pdev->dev, "snd", GPIOD_OUT_LOW);
 	if (IS_ERR(qi_lb60->snd_gpio))
 		return PTR_ERR(qi_lb60->snd_gpio);
-	ret = gpiod_direction_output(qi_lb60->snd_gpio, 0);
-	if (ret)
-		return ret;
 
-	qi_lb60->amp_gpio = devm_gpiod_get(&pdev->dev, "amp");
+	qi_lb60->amp_gpio = devm_gpiod_get(&pdev->dev, "amp", GPIOD_OUT_LOW);
 	if (IS_ERR(qi_lb60->amp_gpio))
 		return PTR_ERR(qi_lb60->amp_gpio);
-	ret = gpiod_direction_output(qi_lb60->amp_gpio, 0);
-	if (ret)
-		return ret;
 
 	card->dev = &pdev->dev;