mfd: qcom_rpm: Use devm_of_platform_populate() to simplify code
[ Upstream commit e48dee96046246980d476714b3f6684d45f29c13 ] Use devm_of_platform_populate() instead of hand-writing it. This simplifies the code. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/fd997dc92b9cee219e9c55e22959a94f4bbf570b.1668949256.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
5c692f1ed3
commit
70c6f70250
@ -672,21 +672,11 @@ static int qcom_rpm_probe(struct platform_device *pdev)
|
|||||||
if (ret)
|
if (ret)
|
||||||
dev_warn(&pdev->dev, "failed to mark wakeup irq as wakeup\n");
|
dev_warn(&pdev->dev, "failed to mark wakeup irq as wakeup\n");
|
||||||
|
|
||||||
return of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
|
return devm_of_platform_populate(&pdev->dev);
|
||||||
}
|
|
||||||
|
|
||||||
static int qcom_rpm_remove(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
struct qcom_rpm *rpm = dev_get_drvdata(&pdev->dev);
|
|
||||||
|
|
||||||
of_platform_depopulate(&pdev->dev);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver qcom_rpm_driver = {
|
static struct platform_driver qcom_rpm_driver = {
|
||||||
.probe = qcom_rpm_probe,
|
.probe = qcom_rpm_probe,
|
||||||
.remove = qcom_rpm_remove,
|
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "qcom_rpm",
|
.name = "qcom_rpm",
|
||||||
.of_match_table = qcom_rpm_of_match,
|
.of_match_table = qcom_rpm_of_match,
|
||||||
|
Loading…
Reference in New Issue
Block a user