]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/mailbox/bcm2835-mailbox.c
Merge tag 'devicetree-fixes-for-5.4-2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / drivers / mailbox / bcm2835-mailbox.c
index e92bbc533821ad9877316bab29672ec05c266ac5..39761d19054594c2e4917d2218ec0346bffc79c8 100644 (file)
@@ -1,15 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 2010,2015 Broadcom
  *  Copyright (C) 2013-2014 Lubomir Rintel
  *  Copyright (C) 2013 Craig McGeachie
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This device provides a mechanism for writing to the mailboxes,
- * that are shared between the ARM and the VideoCore processor
- *
  * Parts of the driver are based on:
  *  - arch/arm/mach-bcm2708/vcio.c file written by Gray Girling that was
  *    obtained from branch "rpi-3.6.y" of git://github.com/raspberrypi/
@@ -178,7 +172,7 @@ static int bcm2835_mbox_probe(struct platform_device *pdev)
        if (!mbox->controller.chans)
                return -ENOMEM;
 
-       ret = mbox_controller_register(&mbox->controller);
+       ret = devm_mbox_controller_register(dev, &mbox->controller);
        if (ret)
                return ret;
 
@@ -188,13 +182,6 @@ static int bcm2835_mbox_probe(struct platform_device *pdev)
        return ret;
 }
 
-static int bcm2835_mbox_remove(struct platform_device *pdev)
-{
-       struct bcm2835_mbox *mbox = platform_get_drvdata(pdev);
-       mbox_controller_unregister(&mbox->controller);
-       return 0;
-}
-
 static const struct of_device_id bcm2835_mbox_of_match[] = {
        { .compatible = "brcm,bcm2835-mbox", },
        {},
@@ -207,7 +194,6 @@ static struct platform_driver bcm2835_mbox_driver = {
                .of_match_table = bcm2835_mbox_of_match,
        },
        .probe          = bcm2835_mbox_probe,
-       .remove         = bcm2835_mbox_remove,
 };
 module_platform_driver(bcm2835_mbox_driver);