diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-05-01 19:37:02 +0900 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-05-30 09:37:47 +0200 |
commit | dc22e08ef71462e56e51e96359105a75097e745c (patch) | |
tree | 29bac45558334ead0a1be820b87daccb9ed7a25c /drivers/reset/reset-socfpga.c | |
parent | 2f38a88c7c9b0bf1407eba3b0e8e74abfdbe446a (diff) | |
download | linux-dc22e08ef71462e56e51e96359105a75097e745c.tar.gz linux-dc22e08ef71462e56e51e96359105a75097e745c.tar.bz2 linux-dc22e08ef71462e56e51e96359105a75097e745c.zip |
reset: socfpga: use devm_reset_controller_register()
Use devm_reset_controller_register() for the reset controller
registration and drop the .remove callback.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/reset/reset-socfpga.c')
-rw-r--r-- | drivers/reset/reset-socfpga.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index cd05a7032b17..12add9b0fa49 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c @@ -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[] = { @@ -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, |