aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/sgtl5000.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/sgtl5000.c')
-rw-r--r--sound/soc/codecs/sgtl5000.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index d1926266fe00..a554b0c8ad38 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -808,6 +808,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
808{ 808{
809 struct ldo_regulator *ldo; 809 struct ldo_regulator *ldo;
810 struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec); 810 struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec);
811 struct regulator_config config = { };
811 812
812 ldo = kzalloc(sizeof(struct ldo_regulator), GFP_KERNEL); 813 ldo = kzalloc(sizeof(struct ldo_regulator), GFP_KERNEL);
813 814
@@ -831,8 +832,11 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
831 ldo->codec_data = codec; 832 ldo->codec_data = codec;
832 ldo->voltage = voltage; 833 ldo->voltage = voltage;
833 834
834 ldo->dev = regulator_register(&ldo->desc, codec->dev, 835 config.dev = codec->dev;
835 init_data, ldo, NULL); 836 config.driver_data = ldo;
837 config.init_data = init_data;
838
839 ldo->dev = regulator_register(&ldo->desc, &config);
836 if (IS_ERR(ldo->dev)) { 840 if (IS_ERR(ldo->dev)) {
837 int ret = PTR_ERR(ldo->dev); 841 int ret = PTR_ERR(ldo->dev);
838 842