Skip to content

Commit

Permalink
mfd: qcom_rpm: Use devm_of_platform_populate() to simplify code
Browse files Browse the repository at this point in the history
Use devm_of_platform_populate() instead of hand-writing it.
This simplifies the code.

Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Link: https://lore.kernel.org/r/fd997dc92b9cee219e9c55e22959a94f4bbf570b.1668949256.git.christophe.jaillet@wanadoo.fr
  • Loading branch information
tititiou36 authored and lag-linaro committed Dec 8, 2022
1 parent 36579ac commit e48dee9
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/mfd/qcom_rpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,21 +672,11 @@ static int qcom_rpm_probe(struct platform_device *pdev)
if (ret)
dev_warn(&pdev->dev, "failed to mark wakeup irq as wakeup\n");

return of_platform_populate(pdev->dev.of_node, NULL, NULL, &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;
return devm_of_platform_populate(&pdev->dev);
}

static struct platform_driver qcom_rpm_driver = {
.probe = qcom_rpm_probe,
.remove = qcom_rpm_remove,
.driver = {
.name = "qcom_rpm",
.of_match_table = qcom_rpm_of_match,
Expand Down

0 comments on commit e48dee9

Please sign in to comment.