提交 6267ee6a 编写于 作者: T Thierry Reding 提交者: Jassi Brar

mailbox: bcm-pdc: 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: NThierry Reding <treding@nvidia.com>
Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
上级 0cafc12a
......@@ -1471,7 +1471,7 @@ static int pdc_mb_init(struct pdc_state *pdcs)
mbc->chans[chan_index].con_priv = pdcs;
/* Register mailbox controller */
err = mbox_controller_register(mbc);
err = devm_mbox_controller_register(dev, mbc);
if (err) {
dev_crit(dev,
"Failed to register PDC mailbox controller. Error %d.",
......@@ -1641,8 +1641,6 @@ static int pdc_remove(struct platform_device *pdev)
pdc_hw_disable(pdcs);
mbox_controller_unregister(&pdcs->mbc);
dma_pool_destroy(pdcs->rx_buf_pool);
dma_pool_destroy(pdcs->ring_pool);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册