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-fpga2sdram.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-fpga2sdram.c')
-rw-r--r-- | drivers/fpga/altera-fpga2sdram.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/fpga/altera-fpga2sdram.c b/drivers/fpga/altera-fpga2sdram.c index 23660ccd634b..a78e49c63c64 100644 --- a/drivers/fpga/altera-fpga2sdram.c +++ b/drivers/fpga/altera-fpga2sdram.c @@ -121,18 +121,16 @@ static int alt_fpga_bridge_probe(struct platform_device *pdev) /* Get f2s bridge configuration saved in handoff register */ regmap_read(sysmgr, SYSMGR_ISWGRP_HANDOFF3, &priv->mask); - br = fpga_bridge_create(dev, F2S_BRIDGE_NAME, - &altera_fpga2sdram_br_ops, priv); + br = devm_fpga_bridge_create(dev, F2S_BRIDGE_NAME, + &altera_fpga2sdram_br_ops, priv); if (!br) return -ENOMEM; platform_set_drvdata(pdev, br); ret = fpga_bridge_register(br); - if (ret) { - fpga_bridge_free(br); + if (ret) return ret; - } dev_info(dev, "driver initialized with handoff %08x\n", priv->mask); |