.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * APM X-Gene SLIMpro MailBox Driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2015, Applied Micro Circuits Corporation |
---|
5 | 6 | * 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 | | - * |
---|
20 | 7 | */ |
---|
21 | 8 | #include <linux/acpi.h> |
---|
22 | 9 | #include <linux/delay.h> |
---|
.. | .. |
---|
224 | 211 | ctx->mb_ctrl.ops = &slimpro_mbox_ops; |
---|
225 | 212 | ctx->mb_ctrl.num_chans = i; |
---|
226 | 213 | |
---|
227 | | - rc = mbox_controller_register(&ctx->mb_ctrl); |
---|
| 214 | + rc = devm_mbox_controller_register(&pdev->dev, &ctx->mb_ctrl); |
---|
228 | 215 | if (rc) { |
---|
229 | 216 | dev_err(&pdev->dev, |
---|
230 | 217 | "APM X-Gene SLIMpro MailBox register failed:%d\n", rc); |
---|
.. | .. |
---|
232 | 219 | } |
---|
233 | 220 | |
---|
234 | 221 | 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); |
---|
243 | 222 | return 0; |
---|
244 | 223 | } |
---|
245 | 224 | |
---|
.. | .. |
---|
259 | 238 | |
---|
260 | 239 | static struct platform_driver slimpro_mbox_driver = { |
---|
261 | 240 | .probe = slimpro_mbox_probe, |
---|
262 | | - .remove = slimpro_mbox_remove, |
---|
263 | 241 | .driver = { |
---|
264 | 242 | .name = "xgene-slimpro-mbox", |
---|
265 | 243 | .of_match_table = of_match_ptr(slimpro_of_match), |
---|