Commit 85a55524 authored by Thierry Reding's avatar Thierry Reding Committed by Jassi Brar

mailbox: platform-mhu: Use device-managed registration API

Get rid of some boilerplate driver removal code by using the newly added
device-managed registration API.
Acked-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent a3abf436
...@@ -163,7 +163,7 @@ static int platform_mhu_probe(struct platform_device *pdev) ...@@ -163,7 +163,7 @@ static int platform_mhu_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, mhu); platform_set_drvdata(pdev, mhu);
err = mbox_controller_register(&mhu->mbox); err = devm_mbox_controller_register(dev, &mhu->mbox);
if (err) { if (err) {
dev_err(dev, "Failed to register mailboxes %d\n", err); dev_err(dev, "Failed to register mailboxes %d\n", err);
return err; return err;
...@@ -173,15 +173,6 @@ static int platform_mhu_probe(struct platform_device *pdev) ...@@ -173,15 +173,6 @@ static int platform_mhu_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int platform_mhu_remove(struct platform_device *pdev)
{
struct platform_mhu *mhu = platform_get_drvdata(pdev);
mbox_controller_unregister(&mhu->mbox);
return 0;
}
static const struct of_device_id platform_mhu_dt_ids[] = { static const struct of_device_id platform_mhu_dt_ids[] = {
{ .compatible = "amlogic,meson-gxbb-mhu", }, { .compatible = "amlogic,meson-gxbb-mhu", },
{ /* sentinel */ }, { /* sentinel */ },
...@@ -190,7 +181,6 @@ MODULE_DEVICE_TABLE(of, platform_mhu_dt_ids); ...@@ -190,7 +181,6 @@ MODULE_DEVICE_TABLE(of, platform_mhu_dt_ids);
static struct platform_driver platform_mhu_driver = { static struct platform_driver platform_mhu_driver = {
.probe = platform_mhu_probe, .probe = platform_mhu_probe,
.remove = platform_mhu_remove,
.driver = { .driver = {
.name = "platform-mhu", .name = "platform-mhu",
.of_match_table = platform_mhu_dt_ids, .of_match_table = platform_mhu_dt_ids,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment