diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-01-11 22:10:21 +0100 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2024-01-23 12:30:20 +0100 |
commit | dec6a613574cd3dea799170b7aaa8fd76e22f176 (patch) | |
tree | 73ebd81ca53a726d653daf94d1fe614aa8ee7344 /drivers/thunderbolt/xdomain.c | |
parent | thunderbolt: Fix rollback in tb_port_lane_bonding_enable() for lane 1 (diff) | |
download | linux-dec6a613574cd3dea799170b7aaa8fd76e22f176.tar.xz linux-dec6a613574cd3dea799170b7aaa8fd76e22f176.zip |
thunderbolt: Remove usage of the deprecated ida_simple_xx() API
ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().
Note that the upper limit of ida_simple_get() is exclusive, but the one of
ida_alloc_range()/ida_alloc_max() is inclusive. So a -1 has been added
when needed.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/xdomain.c')
-rw-r--r-- | drivers/thunderbolt/xdomain.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c index 10693a3ac16d..b48df88981bd 100644 --- a/drivers/thunderbolt/xdomain.c +++ b/drivers/thunderbolt/xdomain.c @@ -997,7 +997,7 @@ static void tb_service_release(struct device *dev) struct tb_xdomain *xd = tb_service_parent(svc); tb_service_debugfs_remove(svc); - ida_simple_remove(&xd->service_ids, svc->id); + ida_free(&xd->service_ids, svc->id); kfree(svc->key); kfree(svc); } @@ -1099,7 +1099,7 @@ static void enumerate_services(struct tb_xdomain *xd) break; } - id = ida_simple_get(&xd->service_ids, 0, 0, GFP_KERNEL); + id = ida_alloc(&xd->service_ids, GFP_KERNEL); if (id < 0) { kfree(svc->key); kfree(svc); |