summaryrefslogtreecommitdiffstats
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorkeliu <liuke94@huawei.com>2022-05-27 08:59:15 +0000
committerXu Yilun <yilun.xu@intel.com>2022-06-08 17:04:39 +0800
commita5e3d775d088658a0bd734eebd07283c9ac79c17 (patch)
tree5ad1813e83782a4f96b56ed07c27d55888280a88 /drivers/fpga/fpga-mgr.c
parent5cd339b370e29b04b85fbb83f40496991465318e (diff)
downloadlinux-a5e3d775d088658a0bd734eebd07283c9ac79c17.tar.bz2
fpga: Directly use ida_alloc()/free()
Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu <liuke94@huawei.com> Link: https://lore.kernel.org/r/20220527085915.2798928-1-liuke94@huawei.com Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
-rw-r--r--drivers/fpga/fpga-mgr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
index a3595ecc3f79..08dc85fcd511 100644
--- a/drivers/fpga/fpga-mgr.c
+++ b/drivers/fpga/fpga-mgr.c
@@ -623,7 +623,7 @@ fpga_mgr_register_full(struct device *parent, const struct fpga_manager_info *in
if (!mgr)
return ERR_PTR(-ENOMEM);
- id = ida_simple_get(&fpga_mgr_ida, 0, 0, GFP_KERNEL);
+ id = ida_alloc(&fpga_mgr_ida, GFP_KERNEL);
if (id < 0) {
ret = id;
goto error_kfree;
@@ -662,7 +662,7 @@ fpga_mgr_register_full(struct device *parent, const struct fpga_manager_info *in
return mgr;
error_device:
- ida_simple_remove(&fpga_mgr_ida, id);
+ ida_free(&fpga_mgr_ida, id);
error_kfree:
kfree(mgr);
@@ -790,7 +790,7 @@ static void fpga_mgr_dev_release(struct device *dev)
{
struct fpga_manager *mgr = to_fpga_manager(dev);
- ida_simple_remove(&fpga_mgr_ida, mgr->dev.id);
+ ida_free(&fpga_mgr_ida, mgr->dev.id);
kfree(mgr);
}