aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty/serdev
diff options
context:
space:
mode:
authorGravatar Christophe JAILLET <christophe.jaillet@wanadoo.fr> 2023-12-10 18:45:58 +0100
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2023-12-15 14:20:06 +0100
commit96d7e361ca4cb0e8b6fa0635a04609b6367257e6 (patch)
treefa4a50286eb4244e2217c54f072f00156a6849df /drivers/tty/serdev
parenttty: allow TIOCSLCKTRMIOS with CAP_CHECKPOINT_RESTORE (diff)
downloadlinux-96d7e361ca4cb0e8b6fa0635a04609b6367257e6.tar.gz
linux-96d7e361ca4cb0e8b6fa0635a04609b6367257e6.tar.bz2
linux-96d7e361ca4cb0e8b6fa0635a04609b6367257e6.zip
serdev: 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/d20d3ac106bac6b7cabe39f22ad00ac86910e0a5.1702230342.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serdev')
-rw-r--r--drivers/tty/serdev/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index de8d87d4858d..822a5cd05566 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -77,7 +77,7 @@ static bool is_serdev_device(const struct device *dev)
static void serdev_ctrl_release(struct device *dev)
{
struct serdev_controller *ctrl = to_serdev_controller(dev);
- ida_simple_remove(&ctrl_ida, ctrl->nr);
+ ida_free(&ctrl_ida, ctrl->nr);
kfree(ctrl);
}
@@ -489,7 +489,7 @@ struct serdev_controller *serdev_controller_alloc(struct device *host,
if (!ctrl)
return NULL;
- id = ida_simple_get(&ctrl_ida, 0, 0, GFP_KERNEL);
+ id = ida_alloc(&ctrl_ida, GFP_KERNEL);
if (id < 0) {
dev_err(parent,
"unable to allocate serdev controller identifier.\n");