Commit 4013286c authored by Thierry Reding's avatar Thierry Reding Committed by Jassi Brar

mailbox: imx: 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 avatarOleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent ad3e7f96
...@@ -324,14 +324,13 @@ static int imx_mu_probe(struct platform_device *pdev) ...@@ -324,14 +324,13 @@ static int imx_mu_probe(struct platform_device *pdev)
imx_mu_init_generic(priv); 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) static int imx_mu_remove(struct platform_device *pdev)
{ {
struct imx_mu_priv *priv = platform_get_drvdata(pdev); struct imx_mu_priv *priv = platform_get_drvdata(pdev);
mbox_controller_unregister(&priv->mbox);
clk_disable_unprepare(priv->clk); clk_disable_unprepare(priv->clk);
return 0; return 0;
......
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