diff options
author | Alan Tull <atull@kernel.org> | 2018-10-15 18:20:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-16 05:13:50 -0400 |
commit | 084181fe8cc7472695b907f0018f4cd00934cb12 (patch) | |
tree | 812b6c10de92d91bccfdec2da621abacc2745c4d /drivers/fpga/socfpga-a10.c | |
parent | 1c87dc897b8c8ace3aa4480fa29ef6439dabb3ab (diff) |
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>
Diffstat (limited to 'drivers/fpga/socfpga-a10.c')
-rw-r--r-- | drivers/fpga/socfpga-a10.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/fpga/socfpga-a10.c b/drivers/fpga/socfpga-a10.c index be30c48eb6e4..573d88bdf730 100644 --- a/drivers/fpga/socfpga-a10.c +++ b/drivers/fpga/socfpga-a10.c | |||
@@ -508,8 +508,8 @@ static int socfpga_a10_fpga_probe(struct platform_device *pdev) | |||
508 | return -EBUSY; | 508 | return -EBUSY; |
509 | } | 509 | } |
510 | 510 | ||
511 | mgr = fpga_mgr_create(dev, "SoCFPGA Arria10 FPGA Manager", | 511 | mgr = devm_fpga_mgr_create(dev, "SoCFPGA Arria10 FPGA Manager", |
512 | &socfpga_a10_fpga_mgr_ops, priv); | 512 | &socfpga_a10_fpga_mgr_ops, priv); |
513 | if (!mgr) | 513 | if (!mgr) |
514 | return -ENOMEM; | 514 | return -ENOMEM; |
515 | 515 | ||
@@ -517,7 +517,6 @@ static int socfpga_a10_fpga_probe(struct platform_device *pdev) | |||
517 | 517 | ||
518 | ret = fpga_mgr_register(mgr); | 518 | ret = fpga_mgr_register(mgr); |
519 | if (ret) { | 519 | if (ret) { |
520 | fpga_mgr_free(mgr); | ||
521 | clk_disable_unprepare(priv->clk); | 520 | clk_disable_unprepare(priv->clk); |
522 | return ret; | 521 | return ret; |
523 | } | 522 | } |