Commit a3abf436 authored by Thierry Reding's avatar Thierry Reding Committed by Jassi Brar

mailbox: omap: 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: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent ec1c674f
...@@ -486,7 +486,7 @@ static int omap_mbox_register(struct omap_mbox_device *mdev) ...@@ -486,7 +486,7 @@ static int omap_mbox_register(struct omap_mbox_device *mdev)
list_add(&mdev->elem, &omap_mbox_devices); list_add(&mdev->elem, &omap_mbox_devices);
mutex_unlock(&omap_mbox_devices_lock); mutex_unlock(&omap_mbox_devices_lock);
ret = mbox_controller_register(&mdev->controller); ret = devm_mbox_controller_register(mdev->dev, &mdev->controller);
err_out: err_out:
if (ret) { if (ret) {
...@@ -508,8 +508,6 @@ static int omap_mbox_unregister(struct omap_mbox_device *mdev) ...@@ -508,8 +508,6 @@ static int omap_mbox_unregister(struct omap_mbox_device *mdev)
list_del(&mdev->elem); list_del(&mdev->elem);
mutex_unlock(&omap_mbox_devices_lock); mutex_unlock(&omap_mbox_devices_lock);
mbox_controller_unregister(&mdev->controller);
mboxes = mdev->mboxes; mboxes = mdev->mboxes;
for (i = 0; mboxes[i]; i++) for (i = 0; mboxes[i]; i++)
device_unregister(mboxes[i]->dev); device_unregister(mboxes[i]->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment