diff options
Diffstat (limited to 'drivers/regulator/max8952.c')
-rw-r--r-- | drivers/regulator/max8952.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index b4084314c222..c0ab4ddc1023 100644 --- a/drivers/regulator/max8952.c +++ b/drivers/regulator/max8952.c | |||
@@ -173,6 +173,7 @@ static int __devinit max8952_pmic_probe(struct i2c_client *client, | |||
173 | { | 173 | { |
174 | struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); | 174 | struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); |
175 | struct max8952_platform_data *pdata = client->dev.platform_data; | 175 | struct max8952_platform_data *pdata = client->dev.platform_data; |
176 | struct regulator_config config = { }; | ||
176 | struct max8952_data *max8952; | 177 | struct max8952_data *max8952; |
177 | 178 | ||
178 | int ret = 0, err = 0; | 179 | int ret = 0, err = 0; |
@@ -193,8 +194,11 @@ static int __devinit max8952_pmic_probe(struct i2c_client *client, | |||
193 | max8952->dev = &client->dev; | 194 | max8952->dev = &client->dev; |
194 | max8952->pdata = pdata; | 195 | max8952->pdata = pdata; |
195 | 196 | ||
196 | max8952->rdev = regulator_register(®ulator, max8952->dev, | 197 | config.dev = max8952->dev; |
197 | &pdata->reg_data, max8952, NULL); | 198 | config.init_data = &pdata->reg_data; |
199 | config.driver_data = max8952; | ||
200 | |||
201 | max8952->rdev = regulator_register(®ulator, &config); | ||
198 | 202 | ||
199 | if (IS_ERR(max8952->rdev)) { | 203 | if (IS_ERR(max8952->rdev)) { |
200 | ret = PTR_ERR(max8952->rdev); | 204 | ret = PTR_ERR(max8952->rdev); |