diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-04-14 12:12:52 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-04-29 17:20:07 +0200 |
commit | 200a289b342bae6cbeb0b7406b2af55feef0de94 (patch) | |
tree | 036209fcbd6b0861fea3c45ae454feb685408033 | |
parent | pps: remove usage of the deprecated ida_simple_xx() API (diff) | |
download | linux-200a289b342bae6cbeb0b7406b2af55feef0de94.tar.xz linux-200a289b342bae6cbeb0b7406b2af55feef0de94.zip |
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>
-rw-r--r-- | drivers/mux/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mux/core.c b/drivers/mux/core.c index 775816112932..78c0022697ec 100644 --- a/drivers/mux/core.c +++ b/drivers/mux/core.c @@ -64,7 +64,7 @@ static void mux_chip_release(struct device *dev) { struct mux_chip *mux_chip = to_mux_chip(dev); - ida_simple_remove(&mux_ida, mux_chip->id); + ida_free(&mux_ida, mux_chip->id); kfree(mux_chip); } @@ -111,7 +111,7 @@ struct mux_chip *mux_chip_alloc(struct device *dev, mux_chip->dev.of_node = dev->of_node; dev_set_drvdata(&mux_chip->dev, mux_chip); - mux_chip->id = ida_simple_get(&mux_ida, 0, 0, GFP_KERNEL); + mux_chip->id = ida_alloc(&mux_ida, GFP_KERNEL); if (mux_chip->id < 0) { int err = mux_chip->id; |