summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2024-10-09 22:53:05 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-13 17:11:51 +0200
commitdfc881abca4247dcf453ce206f05fe09b51be158 (patch)
treefd18a266a1451d213a73a1338005e5dc92503da1 /drivers
parent96ea65295337fed271ce9f136edf6f7eaf3b657c (diff)
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 <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/df8bfbe2a603c596566a4f967e37d10d208bbc3f.1728507153.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/rpmb-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/rpmb-core.c b/drivers/misc/rpmb-core.c
index bc68cde1a8bf..ad1b5c1a37fa 100644
--- a/drivers/misc/rpmb-core.c
+++ b/drivers/misc/rpmb-core.c
@@ -64,7 +64,7 @@ static void rpmb_dev_release(struct device *dev)
struct rpmb_dev *rdev = to_rpmb_dev(dev);
mutex_lock(&rpmb_mutex);
- ida_simple_remove(&rpmb_ida, rdev->id);
+ ida_free(&rpmb_ida, rdev->id);
mutex_unlock(&rpmb_mutex);
kfree(rdev->descr.dev_id);
kfree(rdev);
@@ -176,7 +176,7 @@ struct rpmb_dev *rpmb_dev_register(struct device *dev,
}
mutex_lock(&rpmb_mutex);
- ret = ida_simple_get(&rpmb_ida, 0, 0, GFP_KERNEL);
+ ret = ida_alloc(&rpmb_ida, GFP_KERNEL);
mutex_unlock(&rpmb_mutex);
if (ret < 0)
goto err_free_dev_id;