summaryrefslogtreecommitdiffstats
path: root/Documentation/driver-api/fpga
diff options
context:
space:
mode:
authorAlan Tull <atull@kernel.org>2018-10-16 00:20:01 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-16 11:13:50 +0200
commit084181fe8cc7472695b907f0018f4cd00934cb12 (patch)
tree812b6c10de92d91bccfdec2da621abacc2745c4d /Documentation/driver-api/fpga
parenthv_balloon: Replace spin_is_locked() with lockdep (diff)
downloadlinux-084181fe8cc7472695b907f0018f4cd00934cb12.tar.xz
linux-084181fe8cc7472695b907f0018f4cd00934cb12.zip
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 'Documentation/driver-api/fpga')
-rw-r--r--Documentation/driver-api/fpga/fpga-mgr.rst13
1 files changed, 6 insertions, 7 deletions
diff --git a/Documentation/driver-api/fpga/fpga-mgr.rst b/Documentation/driver-api/fpga/fpga-mgr.rst
index 82b6dbbd31cd..db8885efbc22 100644
--- a/Documentation/driver-api/fpga/fpga-mgr.rst
+++ b/Documentation/driver-api/fpga/fpga-mgr.rst
@@ -49,18 +49,14 @@ probe function calls fpga_mgr_register(), such as::
* them in priv
*/
- mgr = fpga_mgr_create(dev, "Altera SOCFPGA FPGA Manager",
- &socfpga_fpga_ops, priv);
+ mgr = devm_fpga_mgr_create(dev, "Altera SOCFPGA FPGA Manager",
+ &socfpga_fpga_ops, priv);
if (!mgr)
return -ENOMEM;
platform_set_drvdata(pdev, mgr);
- ret = fpga_mgr_register(mgr);
- if (ret)
- fpga_mgr_free(mgr);
-
- return ret;
+ return fpga_mgr_register(mgr);
}
static int socfpga_fpga_remove(struct platform_device *pdev)
@@ -170,6 +166,9 @@ API for implementing a new FPGA Manager driver
:functions: fpga_manager_ops
.. kernel-doc:: drivers/fpga/fpga-mgr.c
+ :functions: devm_fpga_mgr_create
+
+.. kernel-doc:: drivers/fpga/fpga-mgr.c
:functions: fpga_mgr_create
.. kernel-doc:: drivers/fpga/fpga-mgr.c