mailbox: stm32-ipcc: Use device-managed registration API
Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Reviewed-by: Ludovic Barre <ludovic.barre@st.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
This commit is contained in:
parent
08f2f88a3b
commit
368d7767b5
|
@ -299,7 +299,7 @@ static int stm32_ipcc_probe(struct platform_device *pdev)
|
||||||
for (i = 0; i < ipcc->controller.num_chans; i++)
|
for (i = 0; i < ipcc->controller.num_chans; i++)
|
||||||
ipcc->controller.chans[i].con_priv = (void *)i;
|
ipcc->controller.chans[i].con_priv = (void *)i;
|
||||||
|
|
||||||
ret = mbox_controller_register(&ipcc->controller);
|
ret = devm_mbox_controller_register(dev, &ipcc->controller);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_irq_wkp;
|
goto err_irq_wkp;
|
||||||
|
|
||||||
|
@ -329,8 +329,6 @@ static int stm32_ipcc_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct stm32_ipcc *ipcc = platform_get_drvdata(pdev);
|
struct stm32_ipcc *ipcc = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
mbox_controller_unregister(&ipcc->controller);
|
|
||||||
|
|
||||||
if (ipcc->wkp)
|
if (ipcc->wkp)
|
||||||
dev_pm_clear_wake_irq(&pdev->dev);
|
dev_pm_clear_wake_irq(&pdev->dev);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue