ASoC: Support !REGULATOR build for sgtl5000

The regulator is optional depending on board design.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>

+14
+14
sound/soc/codecs/sgtl5000.c
··· 772 return 0; 773 } 774 775 static int ldo_regulator_is_enabled(struct regulator_dev *dev) 776 { 777 struct ldo_regulator *ldo = rdev_get_drvdata(dev); ··· 902 903 return 0; 904 } 905 906 /* 907 * set dac bias
··· 772 return 0; 773 } 774 775 + #ifdef CONFIG_REGULATOR 776 static int ldo_regulator_is_enabled(struct regulator_dev *dev) 777 { 778 struct ldo_regulator *ldo = rdev_get_drvdata(dev); ··· 901 902 return 0; 903 } 904 + #else 905 + static int ldo_regulator_register(struct snd_soc_codec *codec, 906 + struct regulator_init_data *init_data, 907 + int voltage) 908 + { 909 + return -EINVAL; 910 + } 911 + 912 + static int ldo_regulator_remove(struct snd_soc_codec *codec) 913 + { 914 + return 0; 915 + } 916 + #endif 917 918 /* 919 * set dac bias