@@ -369,6 +369,7 @@ int ab8500_ext_regulator_init(struct platform_device *pdev)
struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
struct ab8500_platform_data *ppdata;
struct ab8500_regulator_platform_data *pdata;
+ struct regulator_config config = { };
int i, err;
if (!ab8500) {
@@ -414,6 +415,10 @@ int ab8500_ext_regulator_init(struct platform_device *pdev)
info->cfg = (struct ab8500_ext_regulator_cfg *)
pdata->ext_regulator[i].driver_data;
+ config.dev = &pdev->dev;
+ config.init_data = &pdata->ext_regulator[i];
+ config.driver_data = info;
+
if ((is_ab9540(ab8500)) || (is_ab8540(ab8500))) {
if (info->desc.id == AB8500_EXT_SUPPLY1)
info->desc.ops = &ab9540_ext_regulator_ops;
@@ -426,8 +431,8 @@ int ab8500_ext_regulator_init(struct platform_device *pdev)
}
/* register regulator with framework */
- info->rdev = regulator_register(&info->desc, &pdev->dev,
- &pdata->ext_regulator[i], info, NULL);
+ info->rdev = regulator_register(&info->desc, &config);
+
if (IS_ERR(info->rdev)) {
err = PTR_ERR(info->rdev);
dev_err(&pdev->dev, "failed to register regulator %s\n",