.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Hisilicon's Hi6220 mailbox driver |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * Copyright (c) 2015 Linaro Limited. |
---|
6 | 7 | * |
---|
7 | 8 | * 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 | | - * |
---|
18 | 9 | */ |
---|
19 | 10 | |
---|
20 | 11 | #include <linux/device.h> |
---|
.. | .. |
---|
349 | 340 | mbox->controller.txpoll_period = 5; |
---|
350 | 341 | } |
---|
351 | 342 | |
---|
352 | | - err = mbox_controller_register(&mbox->controller); |
---|
| 343 | + err = devm_mbox_controller_register(dev, &mbox->controller); |
---|
353 | 344 | if (err) { |
---|
354 | 345 | dev_err(dev, "Failed to register mailbox %d\n", err); |
---|
355 | 346 | return err; |
---|
.. | .. |
---|
360 | 351 | return 0; |
---|
361 | 352 | } |
---|
362 | 353 | |
---|
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 | | - |
---|
371 | 354 | static struct platform_driver hi6220_mbox_driver = { |
---|
372 | 355 | .driver = { |
---|
373 | 356 | .name = "hi6220-mbox", |
---|
374 | | - .owner = THIS_MODULE, |
---|
375 | 357 | .of_match_table = hi6220_mbox_of_match, |
---|
376 | 358 | }, |
---|
377 | 359 | .probe = hi6220_mbox_probe, |
---|
378 | | - .remove = hi6220_mbox_remove, |
---|
379 | 360 | }; |
---|
380 | 361 | |
---|
381 | 362 | static int __init hi6220_mbox_init(void) |
---|