summaryrefslogtreecommitdiff
path: root/drivers/mailbox
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-07-22 16:37:23 +0300
committerJassi Brar <jaswinder.singh@linaro.org>2019-09-17 08:38:43 +0300
commit2b983d124a060b7f2d0b6e53b4170c0e2b5c883c (patch)
treec8597553f691d3a7826ae82525147db5508966b1 /drivers/mailbox
parentf74c2bb98776e2de508f4d607cd519873065118e (diff)
downloadlinux-2b983d124a060b7f2d0b6e53b4170c0e2b5c883c.tar.xz
mailbox: armada-37xx-rwtm: Use device-managed registration API
Use devm_mbox_controller_register to get rid of redundant remove function. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r--drivers/mailbox/armada-37xx-rwtm-mailbox.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/mailbox/armada-37xx-rwtm-mailbox.c b/drivers/mailbox/armada-37xx-rwtm-mailbox.c
index 97f90e97a83c..19f086716dc5 100644
--- a/drivers/mailbox/armada-37xx-rwtm-mailbox.c
+++ b/drivers/mailbox/armada-37xx-rwtm-mailbox.c
@@ -180,7 +180,7 @@ static int armada_37xx_mbox_probe(struct platform_device *pdev)
mbox->controller.ops = &a37xx_mbox_ops;
mbox->controller.txdone_irq = true;
- ret = mbox_controller_register(&mbox->controller);
+ ret = devm_mbox_controller_register(mbox->dev, &mbox->controller);
if (ret) {
dev_err(&pdev->dev, "Could not register mailbox controller\n");
return ret;
@@ -190,17 +190,6 @@ static int armada_37xx_mbox_probe(struct platform_device *pdev)
return ret;
}
-static int armada_37xx_mbox_remove(struct platform_device *pdev)
-{
- struct a37xx_mbox *mbox = platform_get_drvdata(pdev);
-
- if (!mbox)
- return -EINVAL;
-
- mbox_controller_unregister(&mbox->controller);
-
- return 0;
-}
static const struct of_device_id armada_37xx_mbox_match[] = {
{ .compatible = "marvell,armada-3700-rwtm-mailbox" },
@@ -211,7 +200,6 @@ MODULE_DEVICE_TABLE(of, armada_37xx_mbox_match);
static struct platform_driver armada_37xx_mbox_driver = {
.probe = armada_37xx_mbox_probe,
- .remove = armada_37xx_mbox_remove,
.driver = {
.name = DRIVER_NAME,
.of_match_table = armada_37xx_mbox_match,