Skip to content

Commit

Permalink
reset: oxnas: Use devm register API and get rid of platform remove
Browse files Browse the repository at this point in the history
Use the brand new devm_reset_controller_register() API to get rid of
the platform driver remove callback.

Signed-off-by: Neil Armstrong <[email protected]>
Signed-off-by: Philipp Zabel <[email protected]>
  • Loading branch information
superna9999 authored and pH5 committed May 30, 2016
1 parent 998cd46 commit 42fa905
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/reset/reset-oxnas.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,11 @@ static int oxnas_reset_probe(struct platform_device *pdev)
data->rcdev.ops = &oxnas_reset_ops;
data->rcdev.of_node = pdev->dev.of_node;

return reset_controller_register(&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;
return devm_reset_controller_register(&pdev->dev, &data->rcdev);
}

static struct platform_driver oxnas_reset_driver = {
.probe = oxnas_reset_probe,
.remove = oxnas_reset_remove,
.driver = {
.name = "oxnas-reset",
.of_match_table = oxnas_reset_dt_ids,
Expand Down

0 comments on commit 42fa905

Please sign in to comment.