hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/mailbox/bcm2835-mailbox.c
....@@ -1,14 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * Copyright (C) 2010,2015 Broadcom
34 * Copyright (C) 2013-2014 Lubomir Rintel
45 * Copyright (C) 2013 Craig McGeachie
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- *
10
- * This device provides a mechanism for writing to the mailboxes,
11
- * that are shared between the ARM and the VideoCore processor
126 *
137 * Parts of the driver are based on:
148 * - arch/arm/mach-bcm2708/vcio.c file written by Gray Girling that was
....@@ -178,7 +172,7 @@
178172 if (!mbox->controller.chans)
179173 return -ENOMEM;
180174
181
- ret = mbox_controller_register(&mbox->controller);
175
+ ret = devm_mbox_controller_register(dev, &mbox->controller);
182176 if (ret)
183177 return ret;
184178
....@@ -186,13 +180,6 @@
186180 dev_info(dev, "mailbox enabled\n");
187181
188182 return ret;
189
-}
190
-
191
-static int bcm2835_mbox_remove(struct platform_device *pdev)
192
-{
193
- struct bcm2835_mbox *mbox = platform_get_drvdata(pdev);
194
- mbox_controller_unregister(&mbox->controller);
195
- return 0;
196183 }
197184
198185 static const struct of_device_id bcm2835_mbox_of_match[] = {
....@@ -207,7 +194,6 @@
207194 .of_match_table = bcm2835_mbox_of_match,
208195 },
209196 .probe = bcm2835_mbox_probe,
210
- .remove = bcm2835_mbox_remove,
211197 };
212198 module_platform_driver(bcm2835_mbox_driver);
213199