hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mailbox/mailbox-sti.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * STi Mailbox
34 *
....@@ -7,11 +8,6 @@
78 *
89 * Based on the original driver written by;
910 * 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.
1511 */
1612
1713 #include <linux/err.h>
....@@ -462,7 +458,7 @@
462458 mbox->chans = chans;
463459 mbox->num_chans = STI_MBOX_CHAN_MAX;
464460
465
- ret = mbox_controller_register(mbox);
461
+ ret = devm_mbox_controller_register(&pdev->dev, mbox);
466462 if (ret)
467463 return ret;
468464
....@@ -480,7 +476,6 @@
480476 IRQF_ONESHOT, mdev->name, mdev);
481477 if (ret) {
482478 dev_err(&pdev->dev, "Can't claim IRQ %d\n", irq);
483
- mbox_controller_unregister(mbox);
484479 return -EINVAL;
485480 }
486481
....@@ -489,18 +484,8 @@
489484 return 0;
490485 }
491486
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
-
501487 static struct platform_driver sti_mbox_driver = {
502488 .probe = sti_mbox_probe,
503
- .remove = sti_mbox_remove,
504489 .driver = {
505490 .name = "sti-mailbox",
506491 .of_match_table = sti_mailbox_match,