Commit 6aba2f4a authored by Thierry Reding's avatar Thierry Reding Committed by Jassi Brar

mailbox: arm-mhu: Use device-managed registration API

Get rid of some boilerplate driver removal code by using the newly added
device-managed registration API.
Reviewed-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent e898d9cd
...@@ -152,7 +152,7 @@ static int mhu_probe(struct amba_device *adev, const struct amba_id *id) ...@@ -152,7 +152,7 @@ static int mhu_probe(struct amba_device *adev, const struct amba_id *id)
amba_set_drvdata(adev, mhu); amba_set_drvdata(adev, mhu);
err = mbox_controller_register(&mhu->mbox); err = devm_mbox_controller_register(dev, &mhu->mbox);
if (err) { if (err) {
dev_err(dev, "Failed to register mailboxes %d\n", err); dev_err(dev, "Failed to register mailboxes %d\n", err);
return err; return err;
...@@ -162,15 +162,6 @@ static int mhu_probe(struct amba_device *adev, const struct amba_id *id) ...@@ -162,15 +162,6 @@ static int mhu_probe(struct amba_device *adev, const struct amba_id *id)
return 0; return 0;
} }
static int mhu_remove(struct amba_device *adev)
{
struct arm_mhu *mhu = amba_get_drvdata(adev);
mbox_controller_unregister(&mhu->mbox);
return 0;
}
static struct amba_id mhu_ids[] = { static struct amba_id mhu_ids[] = {
{ {
.id = 0x1bb098, .id = 0x1bb098,
...@@ -186,7 +177,6 @@ static struct amba_driver arm_mhu_driver = { ...@@ -186,7 +177,6 @@ static struct amba_driver arm_mhu_driver = {
}, },
.id_table = mhu_ids, .id_table = mhu_ids,
.probe = mhu_probe, .probe = mhu_probe,
.remove = mhu_remove,
}; };
module_amba_driver(arm_mhu_driver); module_amba_driver(arm_mhu_driver);
......
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