summaryrefslogtreecommitdiffstats
path: root/drivers/mailbox/armada-37xx-rwtm-mailbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mailbox/armada-37xx-rwtm-mailbox.c')
-rw-r--r--drivers/mailbox/armada-37xx-rwtm-mailbox.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/mailbox/armada-37xx-rwtm-mailbox.c b/drivers/mailbox/armada-37xx-rwtm-mailbox.c
index 97f90e97a83c..02b7b28e6969 100644
--- a/drivers/mailbox/armada-37xx-rwtm-mailbox.c
+++ b/drivers/mailbox/armada-37xx-rwtm-mailbox.c
@@ -143,7 +143,6 @@ static const struct mbox_chan_ops a37xx_mbox_ops = {
static int armada_37xx_mbox_probe(struct platform_device *pdev)
{
struct a37xx_mbox *mbox;
- struct resource *regs;
struct mbox_chan *chans;
int ret;
@@ -156,9 +155,7 @@ static int armada_37xx_mbox_probe(struct platform_device *pdev)
if (!chans)
return -ENOMEM;
- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
- mbox->base = devm_ioremap_resource(&pdev->dev, regs);
+ mbox->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(mbox->base)) {
dev_err(&pdev->dev, "ioremap failed\n");
return PTR_ERR(mbox->base);
@@ -180,7 +177,7 @@ static int armada_37xx_mbox_probe(struct platform_device *pdev)
mbox->controller.ops = &a37xx_mbox_ops;
mbox->controller.txdone_irq = true;
- ret = mbox_controller_register(&mbox->controller);
+ ret = devm_mbox_controller_register(mbox->dev, &mbox->controller);
if (ret) {
dev_err(&pdev->dev, "Could not register mailbox controller\n");
return ret;
@@ -190,17 +187,6 @@ static int armada_37xx_mbox_probe(struct platform_device *pdev)
return ret;
}
-static int armada_37xx_mbox_remove(struct platform_device *pdev)
-{
- struct a37xx_mbox *mbox = platform_get_drvdata(pdev);
-
- if (!mbox)
- return -EINVAL;
-
- mbox_controller_unregister(&mbox->controller);
-
- return 0;
-}
static const struct of_device_id armada_37xx_mbox_match[] = {
{ .compatible = "marvell,armada-3700-rwtm-mailbox" },
@@ -211,7 +197,6 @@ MODULE_DEVICE_TABLE(of, armada_37xx_mbox_match);
static struct platform_driver armada_37xx_mbox_driver = {
.probe = armada_37xx_mbox_probe,
- .remove = armada_37xx_mbox_remove,
.driver = {
.name = DRIVER_NAME,
.of_match_table = armada_37xx_mbox_match,
OpenPOWER on IntegriCloud