Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1391787 > unrolled thread

[PATCH 2/7] reset: ath79: use devm_reset_controller_register()

Started byMasahiro Yamada <yamada.masahiro@socionext.com>
First post2016-05-01 12:40 +0200
Last post2016-05-01 12:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/7] reset: ath79: use devm_reset_controller_register() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-05-01 12:40 +0200

#1391787 — [PATCH 2/7] reset: ath79: use devm_reset_controller_register()

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2016-05-01 12:40 +0200
Subject[PATCH 2/7] reset: ath79: use devm_reset_controller_register()
Message-ID<rtWX8-83x-5@gated-at.bofh.it>
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>
---

 drivers/reset/reset-ath79.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/reset/reset-ath79.c b/drivers/reset/reset-ath79.c
index ccb940a..16d410c 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;
 }
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web