summaryrefslogtreecommitdiffstats
path: root/drivers/mailbox
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-12-20 18:19:47 +0100
committerJassi Brar <jaswinder.singh@linaro.org>2018-12-21 23:49:25 +0100
commit0cafc12ab9cc163e6078db8ec978c200a632e88e (patch)
tree3136a0ab35e133cc7c442c15777320676adc21d3 /drivers/mailbox
parentmailbox: bcm2835: Use device-managed registration API (diff)
downloadlinux-0cafc12ab9cc163e6078db8ec978c200a632e88e.tar.xz
linux-0cafc12ab9cc163e6078db8ec978c200a632e88e.zip
mailbox: bcm-flexrm: Use device-managed registration API
Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Scott Branden <scott.branden@broadcom.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r--drivers/mailbox/bcm-flexrm-mailbox.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mailbox/bcm-flexrm-mailbox.c b/drivers/mailbox/bcm-flexrm-mailbox.c
index d7a8ed7d8097..d713271ebf7c 100644
--- a/drivers/mailbox/bcm-flexrm-mailbox.c
+++ b/drivers/mailbox/bcm-flexrm-mailbox.c
@@ -1665,7 +1665,7 @@ skip_debugfs:
mbox->controller.chans[index].con_priv = &mbox->rings[index];
/* Register mailbox controller */
- ret = mbox_controller_register(&mbox->controller);
+ ret = devm_mbox_controller_register(dev, &mbox->controller);
if (ret)
goto fail_free_debugfs_root;
@@ -1691,8 +1691,6 @@ static int flexrm_mbox_remove(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct flexrm_mbox *mbox = platform_get_drvdata(pdev);
- mbox_controller_unregister(&mbox->controller);
-
debugfs_remove_recursive(mbox->root);
platform_msi_domain_free_irqs(dev);