diff options
Diffstat (limited to 'drivers/regulator/wm8350-regulator.c')
-rw-r--r-- | drivers/regulator/wm8350-regulator.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index 552b1edf8091..4dcbab1314a5 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b/drivers/regulator/wm8350-regulator.c | |||
@@ -1398,6 +1398,7 @@ static irqreturn_t pmic_uv_handler(int irq, void *data) | |||
1398 | static int wm8350_regulator_probe(struct platform_device *pdev) | 1398 | static int wm8350_regulator_probe(struct platform_device *pdev) |
1399 | { | 1399 | { |
1400 | struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev); | 1400 | struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev); |
1401 | struct regulator_config config = { }; | ||
1401 | struct regulator_dev *rdev; | 1402 | struct regulator_dev *rdev; |
1402 | int ret; | 1403 | int ret; |
1403 | u16 val; | 1404 | u16 val; |
@@ -1425,10 +1426,12 @@ static int wm8350_regulator_probe(struct platform_device *pdev) | |||
1425 | break; | 1426 | break; |
1426 | } | 1427 | } |
1427 | 1428 | ||
1429 | config.dev = &pdev->dev; | ||
1430 | config.init_data = pdev->dev.platform_data; | ||
1431 | config.driver_data = dev_get_drvdata(&pdev->dev); | ||
1432 | |||
1428 | /* register regulator */ | 1433 | /* register regulator */ |
1429 | rdev = regulator_register(&wm8350_reg[pdev->id], &pdev->dev, | 1434 | rdev = regulator_register(&wm8350_reg[pdev->id], &config); |
1430 | pdev->dev.platform_data, | ||
1431 | dev_get_drvdata(&pdev->dev), NULL); | ||
1432 | if (IS_ERR(rdev)) { | 1435 | if (IS_ERR(rdev)) { |
1433 | dev_err(&pdev->dev, "failed to register %s\n", | 1436 | dev_err(&pdev->dev, "failed to register %s\n", |
1434 | wm8350_reg[pdev->id].name); | 1437 | wm8350_reg[pdev->id].name); |