Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Christophe JAILLET and committed by
Greg Kroah-Hartman
96d7e361 e0f25b89

+2 -2
+2 -2
drivers/tty/serdev/core.c
··· 77 77 static void serdev_ctrl_release(struct device *dev) 78 78 { 79 79 struct serdev_controller *ctrl = to_serdev_controller(dev); 80 - ida_simple_remove(&ctrl_ida, ctrl->nr); 80 + ida_free(&ctrl_ida, ctrl->nr); 81 81 kfree(ctrl); 82 82 } 83 83 ··· 489 489 if (!ctrl) 490 490 return NULL; 491 491 492 - id = ida_simple_get(&ctrl_ida, 0, 0, GFP_KERNEL); 492 + id = ida_alloc(&ctrl_ida, GFP_KERNEL); 493 493 if (id < 0) { 494 494 dev_err(parent, 495 495 "unable to allocate serdev controller identifier.\n");