Skip to content

Commit

Permalink
mailbox: omap: 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>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
  • Loading branch information
thierryreding authored and JassiBrar committed Dec 21, 2018
1 parent ec1c674 commit a3abf43
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mailbox/omap-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ static int omap_mbox_register(struct omap_mbox_device *mdev)
list_add(&mdev->elem, &omap_mbox_devices);
mutex_unlock(&omap_mbox_devices_lock);

ret = mbox_controller_register(&mdev->controller);
ret = devm_mbox_controller_register(mdev->dev, &mdev->controller);

err_out:
if (ret) {
Expand All @@ -508,8 +508,6 @@ static int omap_mbox_unregister(struct omap_mbox_device *mdev)
list_del(&mdev->elem);
mutex_unlock(&omap_mbox_devices_lock);

mbox_controller_unregister(&mdev->controller);

mboxes = mdev->mboxes;
for (i = 0; mboxes[i]; i++)
device_unregister(mboxes[i]->dev);
Expand Down

0 comments on commit a3abf43

Please sign in to comment.