diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-06-10 10:46:05 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-06-11 06:41:58 -0400 |
commit | 8604bc28365c0673d932b0bfa6e52abb5d4dd62c (patch) | |
tree | 08e8cf6888ab0e631b6e4d82ec6bae2ead1034e8 /sound | |
parent | 21e397bd90c303ea9fe18a1f63ddfa67c48f7150 (diff) |
ASoC: tas2552: Use devm_gpiod_get_optional for enable-gpio
commit ea178d1456dc ("ASoC: tas2552: Make the enable-gpio really optional")
makes enable-gpio optional. devm_gpiod_get_optional() is the better
function for optional gpio, so let's switch to use it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/tas2552.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index 169a7035d7e3..4f25a7d0efa2 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c | |||
@@ -703,13 +703,10 @@ static int tas2552_probe(struct i2c_client *client, | |||
703 | if (data == NULL) | 703 | if (data == NULL) |
704 | return -ENOMEM; | 704 | return -ENOMEM; |
705 | 705 | ||
706 | data->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); | 706 | data->enable_gpio = devm_gpiod_get_optional(dev, "enable", |
707 | if (IS_ERR(data->enable_gpio)) { | 707 | GPIOD_OUT_LOW); |
708 | if (PTR_ERR(data->enable_gpio) == -EPROBE_DEFER) | 708 | if (IS_ERR(data->enable_gpio)) |
709 | return -EPROBE_DEFER; | 709 | return PTR_ERR(data->enable_gpio); |
710 | |||
711 | data->enable_gpio = NULL; | ||
712 | } | ||
713 | 710 | ||
714 | data->tas2552_client = client; | 711 | data->tas2552_client = client; |
715 | data->regmap = devm_regmap_init_i2c(client, &tas2552_regmap_config); | 712 | data->regmap = devm_regmap_init_i2c(client, &tas2552_regmap_config); |