summaryrefslogtreecommitdiff
path: root/drivers/fpga
diff options
context:
space:
mode:
authorMoritz Fischer <mdf@kernel.org>2020-11-15 22:51:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-01 20:49:32 +0300
commitd6530c0a48b77c1460eb4125009ebb37e4e0d8de (patch)
tree62cdf2884938bf3d2e79853ba3286cb7e5a45727 /drivers/fpga
parent20e8963f4f38a9bfaffa74198efae3eb9a8bb7ed (diff)
downloadlinux-d6530c0a48b77c1460eb4125009ebb37e4e0d8de.tar.xz
fpga: fpga-mgr: ts73xx: Simplify registration
Simplify registration using new devm_fpga_mgr_register() API. Reviewed-by: Tom Rix <trix@redhat.com> Signed-off-by: Moritz Fischer <mdf@kernel.org> Link: https://lore.kernel.org/r/20201115195127.284487-8-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fpga')
-rw-r--r--drivers/fpga/ts73xx-fpga.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/fpga/ts73xx-fpga.c b/drivers/fpga/ts73xx-fpga.c
index 2888ff000e4d..101f016c6ed8 100644
--- a/drivers/fpga/ts73xx-fpga.c
+++ b/drivers/fpga/ts73xx-fpga.c
@@ -127,18 +127,7 @@ static int ts73xx_fpga_probe(struct platform_device *pdev)
if (!mgr)
return -ENOMEM;
- platform_set_drvdata(pdev, mgr);
-
- return fpga_mgr_register(mgr);
-}
-
-static int ts73xx_fpga_remove(struct platform_device *pdev)
-{
- struct fpga_manager *mgr = platform_get_drvdata(pdev);
-
- fpga_mgr_unregister(mgr);
-
- return 0;
+ return devm_fpga_mgr_register(kdev, mgr);
}
static struct platform_driver ts73xx_fpga_driver = {
@@ -146,7 +135,6 @@ static struct platform_driver ts73xx_fpga_driver = {
.name = "ts73xx-fpga-mgr",
},
.probe = ts73xx_fpga_probe,
- .remove = ts73xx_fpga_remove,
};
module_platform_driver(ts73xx_fpga_driver);