Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b707a274 authored by Mark Brown's avatar Mark Brown
Browse files

regulator: s2mps11: Convert to devm_regulator_register()

parent b6b7709c
Loading
Loading
Loading
Loading
+1 −19
Original line number Diff line number Diff line
@@ -453,26 +453,9 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
			ret = PTR_ERR(s2mps11->rdev[i]);
			dev_err(&pdev->dev, "regulator init failed for %d\n",
				i);
			s2mps11->rdev[i] = NULL;
			goto err;
		}
	}

	return 0;
err:
	for (i = 0; i < S2MPS11_REGULATOR_MAX; i++)
		regulator_unregister(s2mps11->rdev[i]);

			return ret;
		}

static int s2mps11_pmic_remove(struct platform_device *pdev)
{
	struct s2mps11_info *s2mps11 = platform_get_drvdata(pdev);
	int i;

	for (i = 0; i < S2MPS11_REGULATOR_MAX; i++)
		regulator_unregister(s2mps11->rdev[i]);
	}

	return 0;
}
@@ -489,7 +472,6 @@ static struct platform_driver s2mps11_pmic_driver = {
		.owner = THIS_MODULE,
	},
	.probe = s2mps11_pmic_probe,
	.remove = s2mps11_pmic_remove,
	.id_table = s2mps11_pmic_id,
};