Skip to content

Commit 08333b9

Browse files
keliuandersson
authored andcommitted
remoteproc: Directly use ida_alloc()/free()
Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent cab8300 commit 08333b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/remoteproc/remoteproc_core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,7 +2436,7 @@ static void rproc_type_release(struct device *dev)
24362436
idr_destroy(&rproc->notifyids);
24372437

24382438
if (rproc->index >= 0)
2439-
ida_simple_remove(&rproc_dev_index, rproc->index);
2439+
ida_free(&rproc_dev_index, rproc->index);
24402440

24412441
kfree_const(rproc->firmware);
24422442
kfree_const(rproc->name);
@@ -2553,9 +2553,9 @@ struct rproc *rproc_alloc(struct device *dev, const char *name,
25532553
goto put_device;
25542554

25552555
/* Assign a unique device index and name */
2556-
rproc->index = ida_simple_get(&rproc_dev_index, 0, 0, GFP_KERNEL);
2556+
rproc->index = ida_alloc(&rproc_dev_index, GFP_KERNEL);
25572557
if (rproc->index < 0) {
2558-
dev_err(dev, "ida_simple_get failed: %d\n", rproc->index);
2558+
dev_err(dev, "ida_alloc failed: %d\n", rproc->index);
25592559
goto put_device;
25602560
}
25612561

0 commit comments

Comments
 (0)