Skip to content

Commit 200a289

Browse files
tititiou36akpm00
authored andcommitted
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 <[email protected]> Cc: Peter Rosin <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 55dbc5b commit 200a289

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mux/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void mux_chip_release(struct device *dev)
6464
{
6565
struct mux_chip *mux_chip = to_mux_chip(dev);
6666

67-
ida_simple_remove(&mux_ida, mux_chip->id);
67+
ida_free(&mux_ida, mux_chip->id);
6868
kfree(mux_chip);
6969
}
7070

@@ -111,7 +111,7 @@ struct mux_chip *mux_chip_alloc(struct device *dev,
111111
mux_chip->dev.of_node = dev->of_node;
112112
dev_set_drvdata(&mux_chip->dev, mux_chip);
113113

114-
mux_chip->id = ida_simple_get(&mux_ida, 0, 0, GFP_KERNEL);
114+
mux_chip->id = ida_alloc(&mux_ida, GFP_KERNEL);
115115
if (mux_chip->id < 0) {
116116
int err = mux_chip->id;
117117

0 commit comments

Comments
 (0)