Skip to content

Commit

Permalink
reset: socfpga: 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 2f38a88 commit dc22e08
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/reset/reset-socfpga.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,7 @@ static int socfpga_reset_probe(struct platform_device *pdev)
data->rcdev.ops = &socfpga_reset_ops;
data->rcdev.of_node = pdev->dev.of_node;

return reset_controller_register(&data->rcdev);
}

static int socfpga_reset_remove(struct platform_device *pdev)
{
struct socfpga_reset_data *data = platform_get_drvdata(pdev);

reset_controller_unregister(&data->rcdev);

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

static const struct of_device_id socfpga_reset_dt_ids[] = {
Expand All @@ -153,7 +144,6 @@ static const struct of_device_id socfpga_reset_dt_ids[] = {

static struct platform_driver socfpga_reset_driver = {
.probe = socfpga_reset_probe,
.remove = socfpga_reset_remove,
.driver = {
.name = "socfpga-reset",
.of_match_table = socfpga_reset_dt_ids,
Expand Down

0 comments on commit dc22e08

Please sign in to comment.