hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mailbox/platform_mhu.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2016 BayLibre SAS.
34 * Author: Neil Armstrong <narmstrong@baylibre.com>
....@@ -5,15 +6,6 @@
56 * Copyright (C) 2013-2015 Fujitsu Semiconductor Ltd.
67 * Copyright (C) 2015 Linaro Ltd.
78 * Author: Jassi Brar <jaswinder.singh@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.
179 */
1810
1911 #include <linux/interrupt.h>
....@@ -163,22 +155,13 @@
163155
164156 platform_set_drvdata(pdev, mhu);
165157
166
- err = mbox_controller_register(&mhu->mbox);
158
+ err = devm_mbox_controller_register(dev, &mhu->mbox);
167159 if (err) {
168160 dev_err(dev, "Failed to register mailboxes %d\n", err);
169161 return err;
170162 }
171163
172164 dev_info(dev, "Platform MHU Mailbox registered\n");
173
- return 0;
174
-}
175
-
176
-static int platform_mhu_remove(struct platform_device *pdev)
177
-{
178
- struct platform_mhu *mhu = platform_get_drvdata(pdev);
179
-
180
- mbox_controller_unregister(&mhu->mbox);
181
-
182165 return 0;
183166 }
184167
....@@ -190,7 +173,6 @@
190173
191174 static struct platform_driver platform_mhu_driver = {
192175 .probe = platform_mhu_probe,
193
- .remove = platform_mhu_remove,
194176 .driver = {
195177 .name = "platform-mhu",
196178 .of_match_table = platform_mhu_dt_ids,