--- zzzz-none-000/linux-3.10.107/drivers/regulator/db8500-prcmu.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/regulator/db8500-prcmu.c 2021-02-04 17:41:59.000000000 +0000 @@ -263,6 +263,8 @@ .ops = &db8500_regulator_ops, .type = REGULATOR_VOLTAGE, .owner = THIS_MODULE, + .fixed_uV = 1800000, + .n_voltages = 1, }, .exclude_from_power_state = true, }, @@ -431,17 +433,11 @@ config.of_node = np; /* register with the regulator framework */ - info->rdev = regulator_register(&info->desc, &config); + info->rdev = devm_regulator_register(&pdev->dev, &info->desc, &config); if (IS_ERR(info->rdev)) { err = PTR_ERR(info->rdev); dev_err(&pdev->dev, "failed to register %s: err %i\n", info->desc.name, err); - - /* if failing, unregister all earlier regulators */ - while (--id >= 0) { - info = &dbx500_regulator_info[id]; - regulator_unregister(info->rdev); - } return err; } @@ -530,27 +526,14 @@ static int db8500_regulator_remove(struct platform_device *pdev) { - int i; - ux500_regulator_debug_exit(); - for (i = 0; i < ARRAY_SIZE(dbx500_regulator_info); i++) { - struct dbx500_regulator_info *info; - info = &dbx500_regulator_info[i]; - - dev_vdbg(rdev_get_dev(info->rdev), - "regulator-%s-remove\n", info->desc.name); - - regulator_unregister(info->rdev); - } - return 0; } static struct platform_driver db8500_regulator_driver = { .driver = { .name = "db8500-prcmu-regulators", - .owner = THIS_MODULE, }, .probe = db8500_regulator_probe, .remove = db8500_regulator_remove,