lkml.org 
[lkml]   [2018]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 08/19] mailbox: imx: Use device-managed registration API
Date
From: Thierry Reding <treding@nvidia.com>

Get rid of some boilerplate driver removal code by using the newly added
device-managed registration API.

Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Dong Aisheng <aisheng.dong@nxp.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/mailbox/imx-mailbox.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index 363d35d5e49d..774362a05159 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -324,14 +324,13 @@ static int imx_mu_probe(struct platform_device *pdev)

imx_mu_init_generic(priv);

- return mbox_controller_register(&priv->mbox);
+ return devm_mbox_controller_register(dev, &priv->mbox);
}

static int imx_mu_remove(struct platform_device *pdev)
{
struct imx_mu_priv *priv = platform_get_drvdata(pdev);

- mbox_controller_unregister(&priv->mbox);
clk_disable_unprepare(priv->clk);

return 0;
--
2.19.1
\
 
 \ /
  Last update: 2018-12-20 18:22    [W:0.082 / U:17.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site