diff options
Diffstat (limited to 'drivers/regulator/fixed.c')
-rw-r--r-- | drivers/regulator/fixed.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index 9a7d70a9c8d7..b47b005a8d28 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c | |||
@@ -167,6 +167,7 @@ static int __devinit reg_fixed_voltage_probe(struct platform_device *pdev) | |||
167 | { | 167 | { |
168 | struct fixed_voltage_config *config; | 168 | struct fixed_voltage_config *config; |
169 | struct fixed_voltage_data *drvdata; | 169 | struct fixed_voltage_data *drvdata; |
170 | struct regulator_config cfg = { }; | ||
170 | int ret; | 171 | int ret; |
171 | 172 | ||
172 | if (pdev->dev.of_node) | 173 | if (pdev->dev.of_node) |
@@ -247,9 +248,12 @@ static int __devinit reg_fixed_voltage_probe(struct platform_device *pdev) | |||
247 | drvdata->desc.ops = &fixed_voltage_ops; | 248 | drvdata->desc.ops = &fixed_voltage_ops; |
248 | } | 249 | } |
249 | 250 | ||
250 | drvdata->dev = regulator_register(&drvdata->desc, &pdev->dev, | 251 | cfg.dev = &pdev->dev; |
251 | config->init_data, drvdata, | 252 | cfg.init_data = config->init_data; |
252 | pdev->dev.of_node); | 253 | cfg.driver_data = drvdata; |
254 | cfg.of_node = pdev->dev.of_node; | ||
255 | |||
256 | drvdata->dev = regulator_register(&drvdata->desc, &cfg); | ||
253 | if (IS_ERR(drvdata->dev)) { | 257 | if (IS_ERR(drvdata->dev)) { |
254 | ret = PTR_ERR(drvdata->dev); | 258 | ret = PTR_ERR(drvdata->dev); |
255 | dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret); | 259 | dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret); |