]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/mailbox/mailbox-altera.c
Merge tag 'iomap-4.21-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[linux.git] / drivers / mailbox / mailbox-altera.c
index bcb29df9549eb80512a2c9b4c5d299e941a790c0..397e25ddae29f9edc7201e47d64bc132b2cc4e40 100644 (file)
@@ -341,7 +341,7 @@ static int altera_mbox_probe(struct platform_device *pdev)
                }
        }
 
-       ret = mbox_controller_register(&mbox->controller);
+       ret = devm_mbox_controller_register(&pdev->dev, &mbox->controller);
        if (ret) {
                dev_err(&pdev->dev, "Register mailbox failed\n");
                goto err;
@@ -352,18 +352,6 @@ static int altera_mbox_probe(struct platform_device *pdev)
        return ret;
 }
 
-static int altera_mbox_remove(struct platform_device *pdev)
-{
-       struct altera_mbox *mbox = platform_get_drvdata(pdev);
-
-       if (!mbox)
-               return -EINVAL;
-
-       mbox_controller_unregister(&mbox->controller);
-
-       return 0;
-}
-
 static const struct of_device_id altera_mbox_match[] = {
        { .compatible = "altr,mailbox-1.0" },
        { /* Sentinel */ }
@@ -373,7 +361,6 @@ MODULE_DEVICE_TABLE(of, altera_mbox_match);
 
 static struct platform_driver altera_mbox_driver = {
        .probe  = altera_mbox_probe,
-       .remove = altera_mbox_remove,
        .driver = {
                .name   = DRIVER_NAME,
                .of_match_table = altera_mbox_match,