projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1a56b3
)
ASoC: Support !REGULATOR build for sgtl5000
author
Mark Brown
<
[email protected]
>
Tue, 22 Mar 2011 12:02:33 +0000
(12:02 +0000)
committer
Mark Brown
<
[email protected]
>
Tue, 22 Mar 2011 18:26:30 +0000
(18:26 +0000)
The regulator is optional depending on board design.
Signed-off-by: Mark Brown <
[email protected]
>
Acked-by: Liam Girdwood <
[email protected]
>
sound/soc/codecs/sgtl5000.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/sgtl5000.c
b/sound/soc/codecs/sgtl5000.c
index 1f7217f703ee60381deea291658e93f23949e01c..ff29380c9ed30ee5eb2eda225e505b1415de0269 100644
(file)
--- a/
sound/soc/codecs/sgtl5000.c
+++ b/
sound/soc/codecs/sgtl5000.c
@@
-772,6
+772,7
@@
static int sgtl5000_pcm_hw_params(struct snd_pcm_substream *substream,
return 0;
}
+#ifdef CONFIG_REGULATOR
static int ldo_regulator_is_enabled(struct regulator_dev *dev)
{
struct ldo_regulator *ldo = rdev_get_drvdata(dev);
@@
-901,6
+902,19
@@
static int ldo_regulator_remove(struct snd_soc_codec *codec)
return 0;
}
+#else
+static int ldo_regulator_register(struct snd_soc_codec *codec,
+ struct regulator_init_data *init_data,
+ int voltage)
+{
+ return -EINVAL;
+}
+
+static int ldo_regulator_remove(struct snd_soc_codec *codec)
+{
+ return 0;
+}
+#endif
/*
* set dac bias