forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/mailbox/mailbox-xgene-slimpro.c
....@@ -1,22 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * APM X-Gene SLIMpro MailBox Driver
34 *
45 * Copyright (c) 2015, Applied Micro Circuits Corporation
56 * Author: Feng Kan fkan@apm.com
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License as
9
- * published by the Free Software Foundation; either version 2 of
10
- * the License, or (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
19
- *
207 */
218 #include <linux/acpi.h>
229 #include <linux/delay.h>
....@@ -224,7 +211,7 @@
224211 ctx->mb_ctrl.ops = &slimpro_mbox_ops;
225212 ctx->mb_ctrl.num_chans = i;
226213
227
- rc = mbox_controller_register(&ctx->mb_ctrl);
214
+ rc = devm_mbox_controller_register(&pdev->dev, &ctx->mb_ctrl);
228215 if (rc) {
229216 dev_err(&pdev->dev,
230217 "APM X-Gene SLIMpro MailBox register failed:%d\n", rc);
....@@ -232,14 +219,6 @@
232219 }
233220
234221 dev_info(&pdev->dev, "APM X-Gene SLIMpro MailBox registered\n");
235
- return 0;
236
-}
237
-
238
-static int slimpro_mbox_remove(struct platform_device *pdev)
239
-{
240
- struct slimpro_mbox *smb = platform_get_drvdata(pdev);
241
-
242
- mbox_controller_unregister(&smb->mb_ctrl);
243222 return 0;
244223 }
245224
....@@ -259,7 +238,6 @@
259238
260239 static struct platform_driver slimpro_mbox_driver = {
261240 .probe = slimpro_mbox_probe,
262
- .remove = slimpro_mbox_remove,
263241 .driver = {
264242 .name = "xgene-slimpro-mbox",
265243 .of_match_table = of_match_ptr(slimpro_of_match),