Skip to contentSkip to conversation

reset: oxnas: Use devm register API and get rid of platform remove

PATCH Applied Neil Armstrong 3 participants 4 messages May 20, 2016 Reset controller framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reset: oxnas: Use devm register API and get rid of platform remove

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

---
 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

drivers/reset/reset-oxnas.c +1 -11
index c60fb2d..9449805 100644
@@ -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,
Signature · 1 line
1.9.1
#1 lore raw
Quoted 8 lines · On Friday 20 May 2016 14:21:37 Neil Armstrong wrote:

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

---
 drivers/reset/reset-oxnas.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
Quoted 8 lines

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.

It's too late for that now, as it looks like a cleanup patch that can wait until 4.8. If the patch fixes a bug that prevents it from working correctly, please clarify that in the changelog text.

Arnd

maintainer Applied
#2 lore raw
In reply to Neil Armstrong

Hi Neil,

Am Freitag, den 20.05.2016, 14:21 +0200 schrieb Neil Armstrong:

Quoted 4 lines

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

Quoted 8 lines
---
 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.

Applied, thank you.

Quoted 1 line

I hope it could be merged for 4.7.

I'll submit the branch for 4.8 after 4.7-rc1 is released.

regards
Philipp

#3 lore raw
Quoted 16 lines · Philipp Zabel

Hi Neil,

Am Freitag, den 20.05.2016, 14:21 +0200 schrieb Neil Armstrong:

Quoted 4 lines

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

Quoted 8 lines
---
 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.

Quoted 9 lines

Applied, thank you.

Quoted 1 line

I hope it could be merged for 4.7.

I'll submit the branch for 4.8 after 4.7-rc1 is released.

regards
Philipp

Thanks Philipp,

Sorry I missed the 4.6 release...

Neil