diff options
author | Neil Armstrong <narmstrong@baylibre.com> | 2016-05-20 14:21:37 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-05-30 09:37:47 +0200 |
commit | 42fa905bd901e55c78ed4a69b9e2cf27a49a886b (patch) | |
tree | d7cf49a5a7121c7ec9ad9f7c8b615dd2d8118ab4 | |
parent | 998cd4637f698b04a464f0fbb25e814651979135 (diff) | |
download | lwn-42fa905bd901e55c78ed4a69b9e2cf27a49a886b.tar.gz lwn-42fa905bd901e55c78ed4a69b9e2cf27a49a886b.zip |
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.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
-rw-r--r-- | drivers/reset/reset-oxnas.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/reset/reset-oxnas.c b/drivers/reset/reset-oxnas.c index c60fb2dace3e..944980572f79 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, |