diff options
author | Thierry Reding <treding@nvidia.com> | 2018-12-20 18:19:52 +0100 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2018-12-21 16:49:25 -0600 |
commit | 87f63f578b734ca45cb8ebe251bd65560b89de26 (patch) | |
tree | 776eec29a6f0ad604124a532a11329f84b0eef1f /drivers/mailbox | |
parent | 4013286c7231e05780c6e73b91d357678f819b4b (diff) | |
download | linux-stable-87f63f578b734ca45cb8ebe251bd65560b89de26.tar.gz linux-stable-87f63f578b734ca45cb8ebe251bd65560b89de26.tar.bz2 linux-stable-87f63f578b734ca45cb8ebe251bd65560b89de26.zip |
mailbox: altera: Use device-managed registration API
Get rid of some boilerplate driver removal code by using the newly added
device-managed registration API.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r-- | drivers/mailbox/mailbox-altera.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/mailbox/mailbox-altera.c b/drivers/mailbox/mailbox-altera.c index bcb29df9549e..397e25ddae29 100644 --- a/drivers/mailbox/mailbox-altera.c +++ b/drivers/mailbox/mailbox-altera.c @@ -341,7 +341,7 @@ static int altera_mbox_probe(struct platform_device *pdev) } } - ret = mbox_controller_register(&mbox->controller); + ret = devm_mbox_controller_register(&pdev->dev, &mbox->controller); if (ret) { dev_err(&pdev->dev, "Register mailbox failed\n"); goto err; @@ -352,18 +352,6 @@ err: return ret; } -static int altera_mbox_remove(struct platform_device *pdev) -{ - struct altera_mbox *mbox = platform_get_drvdata(pdev); - - if (!mbox) - return -EINVAL; - - mbox_controller_unregister(&mbox->controller); - - return 0; -} - static const struct of_device_id altera_mbox_match[] = { { .compatible = "altr,mailbox-1.0" }, { /* Sentinel */ } @@ -373,7 +361,6 @@ MODULE_DEVICE_TABLE(of, altera_mbox_match); static struct platform_driver altera_mbox_driver = { .probe = altera_mbox_probe, - .remove = altera_mbox_remove, .driver = { .name = DRIVER_NAME, .of_match_table = altera_mbox_match, |