.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * STi Mailbox |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * |
---|
8 | 9 | * Based on the original driver written by; |
---|
9 | 10 | * Alexandre Torgue, Olivier Lebreton and Loic Pallardy |
---|
10 | | - * |
---|
11 | | - * This program is free software; you can redistribute it and/or modify |
---|
12 | | - * it under the terms of the GNU General Public License as published by |
---|
13 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
14 | | - * (at your option) any later version. |
---|
15 | 11 | */ |
---|
16 | 12 | |
---|
17 | 13 | #include <linux/err.h> |
---|
.. | .. |
---|
462 | 458 | mbox->chans = chans; |
---|
463 | 459 | mbox->num_chans = STI_MBOX_CHAN_MAX; |
---|
464 | 460 | |
---|
465 | | - ret = mbox_controller_register(mbox); |
---|
| 461 | + ret = devm_mbox_controller_register(&pdev->dev, mbox); |
---|
466 | 462 | if (ret) |
---|
467 | 463 | return ret; |
---|
468 | 464 | |
---|
.. | .. |
---|
480 | 476 | IRQF_ONESHOT, mdev->name, mdev); |
---|
481 | 477 | if (ret) { |
---|
482 | 478 | dev_err(&pdev->dev, "Can't claim IRQ %d\n", irq); |
---|
483 | | - mbox_controller_unregister(mbox); |
---|
484 | 479 | return -EINVAL; |
---|
485 | 480 | } |
---|
486 | 481 | |
---|
.. | .. |
---|
489 | 484 | return 0; |
---|
490 | 485 | } |
---|
491 | 486 | |
---|
492 | | -static int sti_mbox_remove(struct platform_device *pdev) |
---|
493 | | -{ |
---|
494 | | - struct sti_mbox_device *mdev = platform_get_drvdata(pdev); |
---|
495 | | - |
---|
496 | | - mbox_controller_unregister(mdev->mbox); |
---|
497 | | - |
---|
498 | | - return 0; |
---|
499 | | -} |
---|
500 | | - |
---|
501 | 487 | static struct platform_driver sti_mbox_driver = { |
---|
502 | 488 | .probe = sti_mbox_probe, |
---|
503 | | - .remove = sti_mbox_remove, |
---|
504 | 489 | .driver = { |
---|
505 | 490 | .name = "sti-mailbox", |
---|
506 | 491 | .of_match_table = sti_mailbox_match, |
---|