| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2016 BayLibre SAS. |
|---|
| 3 | 4 | * Author: Neil Armstrong <narmstrong@baylibre.com> |
|---|
| .. | .. |
|---|
| 5 | 6 | * Copyright (C) 2013-2015 Fujitsu Semiconductor Ltd. |
|---|
| 6 | 7 | * Copyright (C) 2015 Linaro Ltd. |
|---|
| 7 | 8 | * Author: Jassi Brar <jaswinder.singh@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 | 9 | */ |
|---|
| 18 | 10 | |
|---|
| 19 | 11 | #include <linux/interrupt.h> |
|---|
| .. | .. |
|---|
| 163 | 155 | |
|---|
| 164 | 156 | platform_set_drvdata(pdev, mhu); |
|---|
| 165 | 157 | |
|---|
| 166 | | - err = mbox_controller_register(&mhu->mbox); |
|---|
| 158 | + err = devm_mbox_controller_register(dev, &mhu->mbox); |
|---|
| 167 | 159 | if (err) { |
|---|
| 168 | 160 | dev_err(dev, "Failed to register mailboxes %d\n", err); |
|---|
| 169 | 161 | return err; |
|---|
| 170 | 162 | } |
|---|
| 171 | 163 | |
|---|
| 172 | 164 | dev_info(dev, "Platform MHU Mailbox registered\n"); |
|---|
| 173 | | - return 0; |
|---|
| 174 | | -} |
|---|
| 175 | | - |
|---|
| 176 | | -static int platform_mhu_remove(struct platform_device *pdev) |
|---|
| 177 | | -{ |
|---|
| 178 | | - struct platform_mhu *mhu = platform_get_drvdata(pdev); |
|---|
| 179 | | - |
|---|
| 180 | | - mbox_controller_unregister(&mhu->mbox); |
|---|
| 181 | | - |
|---|
| 182 | 165 | return 0; |
|---|
| 183 | 166 | } |
|---|
| 184 | 167 | |
|---|
| .. | .. |
|---|
| 190 | 173 | |
|---|
| 191 | 174 | static struct platform_driver platform_mhu_driver = { |
|---|
| 192 | 175 | .probe = platform_mhu_probe, |
|---|
| 193 | | - .remove = platform_mhu_remove, |
|---|
| 194 | 176 | .driver = { |
|---|
| 195 | 177 | .name = "platform-mhu", |
|---|
| 196 | 178 | .of_match_table = platform_mhu_dt_ids, |
|---|