Commit da1fda2a authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Philipp Zabel

reset: zynq: use devm_reset_controller_register()

Use devm_reset_controller_register() for the reset controller
registration and drop the .remove callback.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent dc22e08e
...@@ -122,16 +122,7 @@ static int zynq_reset_probe(struct platform_device *pdev) ...@@ -122,16 +122,7 @@ static int zynq_reset_probe(struct platform_device *pdev)
priv->rcdev.ops = &zynq_reset_ops; priv->rcdev.ops = &zynq_reset_ops;
priv->rcdev.of_node = pdev->dev.of_node; priv->rcdev.of_node = pdev->dev.of_node;
return reset_controller_register(&priv->rcdev); return devm_reset_controller_register(&pdev->dev, &priv->rcdev);
}
static int zynq_reset_remove(struct platform_device *pdev)
{
struct zynq_reset_data *priv = platform_get_drvdata(pdev);
reset_controller_unregister(&priv->rcdev);
return 0;
} }
static const struct of_device_id zynq_reset_dt_ids[] = { static const struct of_device_id zynq_reset_dt_ids[] = {
...@@ -141,7 +132,6 @@ static const struct of_device_id zynq_reset_dt_ids[] = { ...@@ -141,7 +132,6 @@ static const struct of_device_id zynq_reset_dt_ids[] = {
static struct platform_driver zynq_reset_driver = { static struct platform_driver zynq_reset_driver = {
.probe = zynq_reset_probe, .probe = zynq_reset_probe,
.remove = zynq_reset_remove,
.driver = { .driver = {
.name = KBUILD_MODNAME, .name = KBUILD_MODNAME,
.of_match_table = zynq_reset_dt_ids, .of_match_table = zynq_reset_dt_ids,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment