aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-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 8e92fb88ed09..c395ec370445 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -809,6 +809,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
{
struct ldo_regulator *ldo;
struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec);
+ struct regulator_config config = { };
ldo = kzalloc(sizeof(struct ldo_regulator), GFP_KERNEL);
@@ -832,8 +833,11 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
ldo->codec_data = codec;
ldo->voltage = voltage;
- ldo->dev = regulator_register(&ldo->desc, codec->dev,
- init_data, ldo, NULL);
+ config.dev = codec->dev;
+ config.driver_data = ldo;
+ config.init_data = init_data;
+
+ ldo->dev = regulator_register(&ldo->desc, &config);
if (IS_ERR(ldo->dev)) {
int ret = PTR_ERR(ldo->dev);