diff options
author | Alan Tull <atull@kernel.org> | 2018-10-16 00:20:02 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-16 11:13:50 +0200 |
commit | 213befe049c70cfcfcbb4f6010bd5276dbc1f7b9 (patch) | |
tree | aec320c32e568e2b05b4a9280c45f1e3e6b7daaa /drivers/fpga/altera-hps2fpga.c | |
parent | fpga: mgr: add devm_fpga_mgr_create (diff) | |
download | linux-213befe049c70cfcfcbb4f6010bd5276dbc1f7b9.tar.xz linux-213befe049c70cfcfcbb4f6010bd5276dbc1f7b9.zip |
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>
Diffstat (limited to 'drivers/fpga/altera-hps2fpga.c')
-rw-r--r-- | drivers/fpga/altera-hps2fpga.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/fpga/altera-hps2fpga.c b/drivers/fpga/altera-hps2fpga.c index a974d3f60321..77b95f251821 100644 --- a/drivers/fpga/altera-hps2fpga.c +++ b/drivers/fpga/altera-hps2fpga.c @@ -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); |