]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 20 Feb 2017 17:46:10 +0000 (19:46 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 7 Mar 2017 12:46:38 +0000 (13:46 +0100)
Since index is always 0 replace devm_gpiod_get_index() by devm_gpiod_get()
and apply proper flags.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bdw-rt5677.c

index 53c6b4cbb1e1494519f7c5b76b2051b7dcfc8cb7..14d9693c1641b460159f9b13ba0f0e8298825e69 100644 (file)
@@ -193,13 +193,12 @@ static int bdw_rt5677_init(struct snd_soc_pcm_runtime *rtd)
                        RT5677_CLK_SEL_I2S1_ASRC);
 
        /* Request rt5677 GPIO for headphone amp control */
-       bdw_rt5677->gpio_hp_en = devm_gpiod_get_index(codec->dev,
-                       "headphone-enable", 0, 0);
+       bdw_rt5677->gpio_hp_en = devm_gpiod_get(codec->dev, "headphone-enable",
+                                               GPIOD_OUT_LOW);
        if (IS_ERR(bdw_rt5677->gpio_hp_en)) {
                dev_err(codec->dev, "Can't find HP_AMP_SHDN_L gpio\n");
                return PTR_ERR(bdw_rt5677->gpio_hp_en);
        }
-       gpiod_direction_output(bdw_rt5677->gpio_hp_en, 0);
 
        /* Create and initialize headphone jack */
        if (!snd_soc_card_jack_new(rtd->card, "Headphone Jack",