Skip to content

Commit e48dee9

Browse files
tititiou36lag-linaro
authored andcommitted
mfd: qcom_rpm: Use devm_of_platform_populate() to simplify code
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
1 parent 36579ac commit e48dee9

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

drivers/mfd/qcom_rpm.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -672,21 +672,11 @@ static int qcom_rpm_probe(struct platform_device *pdev)
672672
if (ret)
673673
dev_warn(&pdev->dev, "failed to mark wakeup irq as wakeup\n");
674674

675-
return of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
676-
}
677-
678-
static int qcom_rpm_remove(struct platform_device *pdev)
679-
{
680-
struct qcom_rpm *rpm = dev_get_drvdata(&pdev->dev);
681-
682-
of_platform_depopulate(&pdev->dev);
683-
684-
return 0;
675+
return devm_of_platform_populate(&pdev->dev);
685676
}
686677

687678
static struct platform_driver qcom_rpm_driver = {
688679
.probe = qcom_rpm_probe,
689-
.remove = qcom_rpm_remove,
690680
.driver = {
691681
.name = "qcom_rpm",
692682
.of_match_table = qcom_rpm_of_match,

0 commit comments

Comments
 (0)