hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mailbox/mailbox-altera.c
....@@ -1,17 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright Altera Corporation (C) 2013-2014. All rights reserved
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms and conditions of the GNU General Public License,
6
- * version 2, as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope it will be useful, but WITHOUT
9
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11
- * more details.
12
- *
13
- * You should have received a copy of the GNU General Public License along with
14
- * this program. If not, see <http://www.gnu.org/licenses/>.
154 */
165
176 #include <linux/device.h>
....@@ -341,7 +330,7 @@
341330 }
342331 }
343332
344
- ret = mbox_controller_register(&mbox->controller);
333
+ ret = devm_mbox_controller_register(&pdev->dev, &mbox->controller);
345334 if (ret) {
346335 dev_err(&pdev->dev, "Register mailbox failed\n");
347336 goto err;
....@@ -350,18 +339,6 @@
350339 platform_set_drvdata(pdev, mbox);
351340 err:
352341 return ret;
353
-}
354
-
355
-static int altera_mbox_remove(struct platform_device *pdev)
356
-{
357
- struct altera_mbox *mbox = platform_get_drvdata(pdev);
358
-
359
- if (!mbox)
360
- return -EINVAL;
361
-
362
- mbox_controller_unregister(&mbox->controller);
363
-
364
- return 0;
365342 }
366343
367344 static const struct of_device_id altera_mbox_match[] = {
....@@ -373,7 +350,6 @@
373350
374351 static struct platform_driver altera_mbox_driver = {
375352 .probe = altera_mbox_probe,
376
- .remove = altera_mbox_remove,
377353 .driver = {
378354 .name = DRIVER_NAME,
379355 .of_match_table = altera_mbox_match,