Skip to content

Commit

Permalink
mailbox: bcm-flexrm: Use device-managed registration API
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
thierryreding authored and JassiBrar committed Dec 21, 2018
1 parent 709cbee commit 0cafc12
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mailbox/bcm-flexrm-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -1665,7 +1665,7 @@ static int flexrm_mbox_probe(struct platform_device *pdev)
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;

Expand All @@ -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);
Expand Down

0 comments on commit 0cafc12

Please sign in to comment.