Commit 8aed5719 authored by Thierry Reding's avatar Thierry Reding Committed by Jassi Brar

mailbox: mtk-cmdq: 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 0b7f5fe8
...@@ -337,7 +337,6 @@ static int cmdq_remove(struct platform_device *pdev) ...@@ -337,7 +337,6 @@ static int cmdq_remove(struct platform_device *pdev)
{ {
struct cmdq *cmdq = platform_get_drvdata(pdev); struct cmdq *cmdq = platform_get_drvdata(pdev);
mbox_controller_unregister(&cmdq->mbox);
clk_unprepare(cmdq->clock); clk_unprepare(cmdq->clock);
if (cmdq->mbox.chans) if (cmdq->mbox.chans)
...@@ -524,7 +523,7 @@ static int cmdq_probe(struct platform_device *pdev) ...@@ -524,7 +523,7 @@ static int cmdq_probe(struct platform_device *pdev)
cmdq->mbox.chans[i].con_priv = (void *)&cmdq->thread[i]; cmdq->mbox.chans[i].con_priv = (void *)&cmdq->thread[i];
} }
err = mbox_controller_register(&cmdq->mbox); err = devm_mbox_controller_register(dev, &cmdq->mbox);
if (err < 0) { if (err < 0) {
dev_err(dev, "failed to register mailbox: %d\n", err); dev_err(dev, "failed to register mailbox: %d\n", err);
return err; return err;
......
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