| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2010,2015 Broadcom |
|---|
| 3 | 4 | * Copyright (C) 2013-2014 Lubomir Rintel |
|---|
| 4 | 5 | * 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 |
|---|
| 12 | 6 | * |
|---|
| 13 | 7 | * Parts of the driver are based on: |
|---|
| 14 | 8 | * - arch/arm/mach-bcm2708/vcio.c file written by Gray Girling that was |
|---|
| .. | .. |
|---|
| 178 | 172 | if (!mbox->controller.chans) |
|---|
| 179 | 173 | return -ENOMEM; |
|---|
| 180 | 174 | |
|---|
| 181 | | - ret = mbox_controller_register(&mbox->controller); |
|---|
| 175 | + ret = devm_mbox_controller_register(dev, &mbox->controller); |
|---|
| 182 | 176 | if (ret) |
|---|
| 183 | 177 | return ret; |
|---|
| 184 | 178 | |
|---|
| .. | .. |
|---|
| 186 | 180 | dev_info(dev, "mailbox enabled\n"); |
|---|
| 187 | 181 | |
|---|
| 188 | 182 | 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; |
|---|
| 196 | 183 | } |
|---|
| 197 | 184 | |
|---|
| 198 | 185 | static const struct of_device_id bcm2835_mbox_of_match[] = { |
|---|
| .. | .. |
|---|
| 207 | 194 | .of_match_table = bcm2835_mbox_of_match, |
|---|
| 208 | 195 | }, |
|---|
| 209 | 196 | .probe = bcm2835_mbox_probe, |
|---|
| 210 | | - .remove = bcm2835_mbox_remove, |
|---|
| 211 | 197 | }; |
|---|
| 212 | 198 | module_platform_driver(bcm2835_mbox_driver); |
|---|
| 213 | 199 | |
|---|