diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-05-01 19:36:58 +0900 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-05-30 09:37:47 +0200 |
commit | 56865f452a11843e54c215294a436acee31b0c0b (patch) | |
tree | 9dab2da83839513223e4dd989236572ecfcf84c1 /drivers/reset/reset-ath79.c | |
parent | 8d5b5d5ce58ee1b90110f4e358eefe3c3a6b08a2 (diff) | |
download | linux-56865f452a11843e54c215294a436acee31b0c0b.tar.bz2 |
reset: ath79: use devm_reset_controller_register()
Use devm_reset_controller_register() for the reset controller
registration and remove the unregister call from 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-ath79.c')
-rw-r--r-- | drivers/reset/reset-ath79.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/reset/reset-ath79.c b/drivers/reset/reset-ath79.c index ccb940a8d9fb..16d410cd6146 100644 --- a/drivers/reset/reset-ath79.c +++ b/drivers/reset/reset-ath79.c @@ -112,7 +112,7 @@ static int ath79_reset_probe(struct platform_device *pdev) ath79_reset->rcdev.of_reset_n_cells = 1; ath79_reset->rcdev.nr_resets = 32; - err = reset_controller_register(&ath79_reset->rcdev); + err = devm_reset_controller_register(&pdev->dev, &ath79_reset->rcdev); if (err) return err; @@ -131,7 +131,6 @@ static int ath79_reset_remove(struct platform_device *pdev) struct ath79_reset *ath79_reset = platform_get_drvdata(pdev); unregister_restart_handler(&ath79_reset->restart_nb); - reset_controller_unregister(&ath79_reset->rcdev); return 0; } |