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.

mux: 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.

Link: https://lkml.kernel.org/r/f82e013abe4c71f1c7d06819f96472f298acdcf3.1713089554.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Peter Rosin <peda@axentia.se>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Christophe JAILLET and committed by
Andrew Morton
200a289b 55dbc5b5

+2 -2
+2 -2
drivers/mux/core.c
··· 64 64 { 65 65 struct mux_chip *mux_chip = to_mux_chip(dev); 66 66 67 - ida_simple_remove(&mux_ida, mux_chip->id); 67 + ida_free(&mux_ida, mux_chip->id); 68 68 kfree(mux_chip); 69 69 } 70 70 ··· 111 111 mux_chip->dev.of_node = dev->of_node; 112 112 dev_set_drvdata(&mux_chip->dev, mux_chip); 113 113 114 - mux_chip->id = ida_simple_get(&mux_ida, 0, 0, GFP_KERNEL); 114 + mux_chip->id = ida_alloc(&mux_ida, GFP_KERNEL); 115 115 if (mux_chip->id < 0) { 116 116 int err = mux_chip->id; 117 117