mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
fpga: mgr: add devm_fpga_mgr_create
Add devm_fpga_mgr_create() which is the managed version of fpga_mgr_create(). Change current FPGA manager drivers to use devm_fpga_mgr_create() Signed-off-by: Alan Tull <atull@kernel.org> Suggested-by: Federico Vaga <federico.vaga@cern.ch> Acked-by: Moritz Fischer <mdf@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1c87dc897b
commit
084181fe8c
14 changed files with 97 additions and 87 deletions
|
@ -614,8 +614,8 @@ static int zynq_fpga_probe(struct platform_device *pdev)
|
|||
|
||||
clk_disable(priv->clk);
|
||||
|
||||
mgr = fpga_mgr_create(dev, "Xilinx Zynq FPGA Manager",
|
||||
&zynq_fpga_ops, priv);
|
||||
mgr = devm_fpga_mgr_create(dev, "Xilinx Zynq FPGA Manager",
|
||||
&zynq_fpga_ops, priv);
|
||||
if (!mgr)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -624,7 +624,6 @@ static int zynq_fpga_probe(struct platform_device *pdev)
|
|||
err = fpga_mgr_register(mgr);
|
||||
if (err) {
|
||||
dev_err(dev, "unable to register FPGA manager\n");
|
||||
fpga_mgr_free(mgr);
|
||||
clk_unprepare(priv->clk);
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue