public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] reset: oxnas: Use devm register API and get rid of platform remove
@ 2016-05-20 12:21 Neil Armstrong
  2016-05-20 12:26 ` Arnd Bergmann
  2016-05-20 13:02 ` Philipp Zabel
  0 siblings, 2 replies; 4+ messages in thread
From: Neil Armstrong @ 2016-05-20 12:21 UTC (permalink / raw)
  To: linux-arm-kernel

Use the brand new devm_reset_controller_register() API to get rid of
the platform driver remove callback.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/reset/reset-oxnas.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Hi Philip,

This patch is based on your reset/next tree after the new
devm_reset_controller_register() was merged.

I hope it could be merged for 4.7.

Thanks,
Neil

diff --git a/drivers/reset/reset-oxnas.c b/drivers/reset/reset-oxnas.c
index c60fb2d..9449805 100644
--- a/drivers/reset/reset-oxnas.c
+++ b/drivers/reset/reset-oxnas.c
@@ -112,21 +112,11 @@ static int oxnas_reset_probe(struct platform_device *pdev)
 	data->rcdev.ops = &oxnas_reset_ops;
 	data->rcdev.of_node = pdev->dev.of_node;
 
-	return reset_controller_register(&data->rcdev);
-}
-
-static int oxnas_reset_remove(struct platform_device *pdev)
-{
-	struct oxnas_reset *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 oxnas_reset_driver = {
 	.probe	= oxnas_reset_probe,
-	.remove	= oxnas_reset_remove,
 	.driver = {
 		.name		= "oxnas-reset",
 		.of_match_table	= oxnas_reset_dt_ids,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-20 13:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-20 12:21 [PATCH] reset: oxnas: Use devm register API and get rid of platform remove Neil Armstrong
2016-05-20 12:26 ` Arnd Bergmann
2016-05-20 13:02 ` Philipp Zabel
2016-05-20 13:03   ` Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox