Skip to content

Commit dfc881a

Browse files
tititiou36gregkh
authored andcommitted
rpmb: 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(). This is less verbose. Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/df8bfbe2a603c596566a4f967e37d10d208bbc3f.1728507153.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 96ea652 commit dfc881a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/misc/rpmb-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void rpmb_dev_release(struct device *dev)
6464
struct rpmb_dev *rdev = to_rpmb_dev(dev);
6565

6666
mutex_lock(&rpmb_mutex);
67-
ida_simple_remove(&rpmb_ida, rdev->id);
67+
ida_free(&rpmb_ida, rdev->id);
6868
mutex_unlock(&rpmb_mutex);
6969
kfree(rdev->descr.dev_id);
7070
kfree(rdev);
@@ -176,7 +176,7 @@ struct rpmb_dev *rpmb_dev_register(struct device *dev,
176176
}
177177

178178
mutex_lock(&rpmb_mutex);
179-
ret = ida_simple_get(&rpmb_ida, 0, 0, GFP_KERNEL);
179+
ret = ida_alloc(&rpmb_ida, GFP_KERNEL);
180180
mutex_unlock(&rpmb_mutex);
181181
if (ret < 0)
182182
goto err_free_dev_id;

0 commit comments

Comments
 (0)