mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
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>
This commit is contained in:
parent
c9d754d6f7
commit
83eb4fbdcf
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user