Commit 42fa905b authored by Neil Armstrong's avatar Neil Armstrong Committed by Philipp Zabel

reset: oxnas: Use devm register API and get rid of platform remove

Use the brand new devm_reset_controller_register() API to get rid of
the platform driver remove callback.
Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 998cd463
...@@ -112,21 +112,11 @@ static int oxnas_reset_probe(struct platform_device *pdev) ...@@ -112,21 +112,11 @@ static int oxnas_reset_probe(struct platform_device *pdev)
data->rcdev.ops = &oxnas_reset_ops; data->rcdev.ops = &oxnas_reset_ops;
data->rcdev.of_node = pdev->dev.of_node; data->rcdev.of_node = pdev->dev.of_node;
return reset_controller_register(&data->rcdev); return devm_reset_controller_register(&pdev->dev, &data->rcdev);
}
static int oxnas_reset_remove(struct platform_device *pdev)
{
struct oxnas_reset *data = platform_get_drvdata(pdev);
reset_controller_unregister(&data->rcdev);
return 0;
} }
static struct platform_driver oxnas_reset_driver = { static struct platform_driver oxnas_reset_driver = {
.probe = oxnas_reset_probe, .probe = oxnas_reset_probe,
.remove = oxnas_reset_remove,
.driver = { .driver = {
.name = "oxnas-reset", .name = "oxnas-reset",
.of_match_table = oxnas_reset_dt_ids, .of_match_table = oxnas_reset_dt_ids,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment