summaryrefslogtreecommitdiff
path: root/drivers/mailbox
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-12-20 20:19:59 +0300
committerJassi Brar <jaswinder.singh@linaro.org>2018-12-22 01:49:25 +0300
commit83dd44a17d40ab258aede6f560d27444e7dcfba7 (patch)
treecb082d5af803c7b45a86788eed027d27e9a62041 /drivers/mailbox
parent85a555246e6db7b4e9803704e1e0c694dfe658a0 (diff)
downloadlinux-83dd44a17d40ab258aede6f560d27444e7dcfba7.tar.xz
mailbox: qcom-apcs: Use device-managed registration API
Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r--drivers/mailbox/qcom-apcs-ipc-mailbox.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
index aed23ac9550d..3cf2937be149 100644
--- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c
+++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
@@ -91,7 +91,7 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
apcs->mbox.chans = apcs->mbox_chans;
apcs->mbox.num_chans = ARRAY_SIZE(apcs->mbox_chans);
- ret = mbox_controller_register(&apcs->mbox);
+ ret = devm_mbox_controller_register(&pdev->dev, &apcs->mbox);
if (ret) {
dev_err(&pdev->dev, "failed to register APCS IPC controller\n");
return ret;
@@ -115,7 +115,6 @@ static int qcom_apcs_ipc_remove(struct platform_device *pdev)
struct qcom_apcs_ipc *apcs = platform_get_drvdata(pdev);
struct platform_device *clk = apcs->clk;
- mbox_controller_unregister(&apcs->mbox);
platform_device_unregister(clk);
return 0;