projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55dbc5b
)
mux: remove usage of the deprecated ida_simple_xx() API
author
Christophe JAILLET
<christophe.jaillet@wanadoo.fr>
Sun, 14 Apr 2024 10:12:52 +0000
(12:12 +0200)
committer
Andrew Morton
<akpm@linux-foundation.org>
Mon, 29 Apr 2024 15:20:07 +0000
(08:20 -0700)
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>
drivers/mux/core.c
patch
|
blob
|
history
diff --git
a/drivers/mux/core.c
b/drivers/mux/core.c
index 7758161129320f35a112f17448c2b847a2a213af..78c0022697ec7c3428dcdf95a5cdd89bd6096ab8 100644
(file)
--- 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_remov
e(&mux_ida, mux_chip->id);
+ ida_
fre
e(&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;