summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2015-06-04 13:04:13 (GMT)
committerMark Brown <broonie@kernel.org>2015-06-04 16:49:28 (GMT)
commitea178d1456dcf88875d5edd148f2df8ea0de1794 (patch)
tree741bbb3383a13d8aed3de51860eee1633dc5f462 /sound
parentb787f68c36d49bb1d9236f403813641efa74a031 (diff)
downloadlinux-ea178d1456dcf88875d5edd148f2df8ea0de1794.tar.xz
ASoC: tas2552: Make the enable-gpio really optional
Do not fail the probe if the enable-gpio is not specifiedbut handle deferred probe case. Signed-off-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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index dfb4ff5..ff82f46 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -486,8 +486,12 @@ static int tas2552_probe(struct i2c_client *client,
return -ENOMEM;
data->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
- if (IS_ERR(data->enable_gpio))
- return PTR_ERR(data->enable_gpio);
+ if (IS_ERR(data->enable_gpio)) {
+ if (PTR_ERR(data->enable_gpio) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
+
+ data->enable_gpio = NULL;;
+ }
data->tas2552_client = client;
data->regmap = devm_regmap_init_i2c(client, &tas2552_regmap_config);