summaryrefslogtreecommitdiff
path: root/drivers/reset
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-05-01 19:37:01 +0900
committerPhilipp Zabel <p.zabel@pengutronix.de>2016-05-30 09:37:47 +0200
commit2f38a88c7c9b0bf1407eba3b0e8e74abfdbe446a (patch)
tree45f14b14dda933bfc03750a316625e613ce8762d /drivers/reset
parent1b1447f49312ac0777fcbc85f0d70b809e458a48 (diff)
reset: sunxi: 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')
-rw-r--r--drivers/reset/reset-sunxi.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
index 677f86555212..3080190b3f90 100644
--- a/drivers/reset/reset-sunxi.c
+++ b/drivers/reset/reset-sunxi.c
@@ -165,21 +165,11 @@ static int sunxi_reset_probe(struct platform_device *pdev)
data->rcdev.ops = &sunxi_reset_ops;
data->rcdev.of_node = pdev->dev.of_node;
- return reset_controller_register(&data->rcdev);
-}
-
-static int sunxi_reset_remove(struct platform_device *pdev)
-{
- struct sunxi_reset_data *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 sunxi_reset_driver = {
.probe = sunxi_reset_probe,
- .remove = sunxi_reset_remove,
.driver = {
.name = "sunxi-reset",
.of_match_table = sunxi_reset_dt_ids,