mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
fpga: bridge: add devm_fpga_bridge_create
Add devm_fpga_bridge_create() which is the managed version of fpga_bridge_create(). Change current bridge drivers to use devm_fpga_bridge_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
084181fe8c
commit
213befe049
8 changed files with 80 additions and 38 deletions
|
@ -180,7 +180,8 @@ static int alt_fpga_bridge_probe(struct platform_device *pdev)
|
|||
}
|
||||
}
|
||||
|
||||
br = fpga_bridge_create(dev, priv->name, &altera_hps2fpga_br_ops, priv);
|
||||
br = devm_fpga_bridge_create(dev, priv->name,
|
||||
&altera_hps2fpga_br_ops, priv);
|
||||
if (!br) {
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
|
@ -190,12 +191,10 @@ static int alt_fpga_bridge_probe(struct platform_device *pdev)
|
|||
|
||||
ret = fpga_bridge_register(br);
|
||||
if (ret)
|
||||
goto err_free;
|
||||
goto err;
|
||||
|
||||
return 0;
|
||||
|
||||
err_free:
|
||||
fpga_bridge_free(br);
|
||||
err:
|
||||
clk_disable_unprepare(priv->clk);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue