hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/mailbox/hi6220-mailbox.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Hisilicon's Hi6220 mailbox driver
34 *
....@@ -5,16 +6,6 @@
56 * Copyright (c) 2015 Linaro Limited.
67 *
78 * Author: Leo Yan <leo.yan@linaro.org>
8
- *
9
- * This program is free software: you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation, version 2 of the License.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
17
- *
189 */
1910
2011 #include <linux/device.h>
....@@ -349,7 +340,7 @@
349340 mbox->controller.txpoll_period = 5;
350341 }
351342
352
- err = mbox_controller_register(&mbox->controller);
343
+ err = devm_mbox_controller_register(dev, &mbox->controller);
353344 if (err) {
354345 dev_err(dev, "Failed to register mailbox %d\n", err);
355346 return err;
....@@ -360,22 +351,12 @@
360351 return 0;
361352 }
362353
363
-static int hi6220_mbox_remove(struct platform_device *pdev)
364
-{
365
- struct hi6220_mbox *mbox = platform_get_drvdata(pdev);
366
-
367
- mbox_controller_unregister(&mbox->controller);
368
- return 0;
369
-}
370
-
371354 static struct platform_driver hi6220_mbox_driver = {
372355 .driver = {
373356 .name = "hi6220-mbox",
374
- .owner = THIS_MODULE,
375357 .of_match_table = hi6220_mbox_of_match,
376358 },
377359 .probe = hi6220_mbox_probe,
378
- .remove = hi6220_mbox_remove,
379360 };
380361
381362 static int __init hi6220_mbox_init(void)