ctx->mb_ctrl.ops = &slimpro_mbox_ops;
ctx->mb_ctrl.num_chans = i;
- rc = mbox_controller_register(&ctx->mb_ctrl);
+ rc = devm_mbox_controller_register(&pdev->dev, &ctx->mb_ctrl);
if (rc) {
dev_err(&pdev->dev,
"APM X-Gene SLIMpro MailBox register failed:%d\n", rc);
return 0;
}
-static int slimpro_mbox_remove(struct platform_device *pdev)
-{
- struct slimpro_mbox *smb = platform_get_drvdata(pdev);
-
- mbox_controller_unregister(&smb->mb_ctrl);
- return 0;
-}
-
static const struct of_device_id slimpro_of_match[] = {
{.compatible = "apm,xgene-slimpro-mbox" },
{ },
static struct platform_driver slimpro_mbox_driver = {
.probe = slimpro_mbox_probe,
- .remove = slimpro_mbox_remove,
.driver = {
.name = "xgene-slimpro-mbox",
.of_match_table = of_match_ptr(slimpro_of_match),