Skip to content

Commit

Permalink
reset: pistachio: use devm_reset_controller_register()
Browse files Browse the repository at this point in the history
Use devm_reset_controller_register() for the reset controller
registration and drop the .remove callback.

Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Philipp Zabel <[email protected]>
  • Loading branch information
masahir0y authored and pH5 committed May 30, 2016
1 parent 56865f4 commit 1b1447f
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/reset/reset-pistachio.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,7 @@ static int pistachio_reset_probe(struct platform_device *pdev)
rd->rcdev.ops = &pistachio_reset_ops;
rd->rcdev.of_node = np;

return reset_controller_register(&rd->rcdev);
}

static int pistachio_reset_remove(struct platform_device *pdev)
{
struct pistachio_reset_data *data = platform_get_drvdata(pdev);

reset_controller_unregister(&data->rcdev);

return 0;
return devm_reset_controller_register(dev, &rd->rcdev);
}

static const struct of_device_id pistachio_reset_dt_ids[] = {
Expand All @@ -141,7 +132,6 @@ MODULE_DEVICE_TABLE(of, pistachio_reset_dt_ids);

static struct platform_driver pistachio_reset_driver = {
.probe = pistachio_reset_probe,
.remove = pistachio_reset_remove,
.driver = {
.name = "pistachio-reset",
.of_match_table = pistachio_reset_dt_ids,
Expand Down

0 comments on commit 1b1447f

Please sign in to comment.