Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mailbox: platform-mhu: Use device-managed registration API

Get rid of some boilerplate driver removal code by using the newly added
device-managed registration API.

Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>

authored by

Thierry Reding and committed by
Jassi Brar
85a55524 a3abf436

+1 -11
+1 -11
drivers/mailbox/platform_mhu.c
··· 163 163 164 164 platform_set_drvdata(pdev, mhu); 165 165 166 - err = mbox_controller_register(&mhu->mbox); 166 + err = devm_mbox_controller_register(dev, &mhu->mbox); 167 167 if (err) { 168 168 dev_err(dev, "Failed to register mailboxes %d\n", err); 169 169 return err; 170 170 } 171 171 172 172 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 173 return 0; 183 174 } 184 175 ··· 181 190 182 191 static struct platform_driver platform_mhu_driver = { 183 192 .probe = platform_mhu_probe, 184 - .remove = platform_mhu_remove, 185 193 .driver = { 186 194 .name = "platform-mhu", 187 195 .of_match_table = platform_mhu_dt_ids,