aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/dfl-fme-mgr.c
diff options
context:
space:
mode:
authorMoritz Fischer2020-11-15 11:51:20 -0800
committerGreg Kroah-Hartman2020-12-01 18:49:32 +0100
commit83eb4fbdcfda8b8e9a5c74c1d27e280183f1a77b (patch)
tree1e95f12fddfeb9d212c150d454dc06365cd35b4d /drivers/fpga/dfl-fme-mgr.c
parentc9d754d6f71c780caa2d496b39e54f86a6622a0d (diff)
fpga: fpga-mgr: dfl-fme-mgr: Simplify registration
Simplify registration using new devm_fpga_mgr_register() API. Reviewed-by: Tom Rix <trix@redhat.com> Signed-off-by: Moritz Fischer <mdf@kernel.org> Link: https://lore.kernel.org/r/20201115195127.284487-4-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fpga/dfl-fme-mgr.c')
-rw-r--r--drivers/fpga/dfl-fme-mgr.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/fpga/dfl-fme-mgr.c b/drivers/fpga/dfl-fme-mgr.c
index b3f7eee3c93f..d5861d13b306 100644
--- a/drivers/fpga/dfl-fme-mgr.c
+++ b/drivers/fpga/dfl-fme-mgr.c
@@ -314,18 +314,8 @@ static int fme_mgr_probe(struct platform_device *pdev)
return -ENOMEM;
mgr->compat_id = compat_id;
- platform_set_drvdata(pdev, mgr);
- return fpga_mgr_register(mgr);
-}
-
-static int fme_mgr_remove(struct platform_device *pdev)
-{
- struct fpga_manager *mgr = platform_get_drvdata(pdev);
-
- fpga_mgr_unregister(mgr);
-
- return 0;
+ return devm_fpga_mgr_register(dev, mgr);
}
static struct platform_driver fme_mgr_driver = {
@@ -333,7 +323,6 @@ static struct platform_driver fme_mgr_driver = {
.name = DFL_FPGA_FME_MGR,
},
.probe = fme_mgr_probe,
- .remove = fme_mgr_remove,
};
module_platform_driver(fme_mgr_driver);