summaryrefslogtreecommitdiff
path: root/drivers/mailbox
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-12-20 18:19:50 +0100
committerJassi Brar <jaswinder.singh@linaro.org>2018-12-21 16:49:25 -0600
commitad3e7f9651ca344fc14b1709c7f91d9e570c389c (patch)
tree349e69e460b3446be94feb03e88e54e3214122db /drivers/mailbox
parente73cb83c807b3a1c3c430b646668ce358b13ee74 (diff)
mailbox: hi6220: Use device-managed registration API
Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Reviewed-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r--drivers/mailbox/hi6220-mailbox.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/mailbox/hi6220-mailbox.c b/drivers/mailbox/hi6220-mailbox.c
index 4fa9803cd204..c32cbfaf223a 100644
--- a/drivers/mailbox/hi6220-mailbox.c
+++ b/drivers/mailbox/hi6220-mailbox.c
@@ -349,7 +349,7 @@ static int hi6220_mbox_probe(struct platform_device *pdev)
mbox->controller.txpoll_period = 5;
}
- err = mbox_controller_register(&mbox->controller);
+ err = devm_mbox_controller_register(dev, &mbox->controller);
if (err) {
dev_err(dev, "Failed to register mailbox %d\n", err);
return err;
@@ -360,14 +360,6 @@ static int hi6220_mbox_probe(struct platform_device *pdev)
return 0;
}
-static int hi6220_mbox_remove(struct platform_device *pdev)
-{
- struct hi6220_mbox *mbox = platform_get_drvdata(pdev);
-
- mbox_controller_unregister(&mbox->controller);
- return 0;
-}
-
static struct platform_driver hi6220_mbox_driver = {
.driver = {
.name = "hi6220-mbox",
@@ -375,7 +367,6 @@ static struct platform_driver hi6220_mbox_driver = {
.of_match_table = hi6220_mbox_of_match,
},
.probe = hi6220_mbox_probe,
- .remove = hi6220_mbox_remove,
};
static int __init hi6220_mbox_init(void)