projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00bf464
)
base: soc: Remove usage of the deprecated ida_simple_xx() API
author
Christophe JAILLET
<christophe.jaillet@wanadoo.fr>
Wed, 1 Nov 2023 09:33:33 +0000
(10:33 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 7 Dec 2023 02:22:23 +0000
(11:22 +0900)
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/f0ef849446c9b3df7d6b16b1a58d089b4c17276c.1698831191.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/soc.c
patch
|
blob
|
history
diff --git
a/drivers/base/soc.c
b/drivers/base/soc.c
index 8dec5228fde3d43e6af5e82727623c383a203c34..c741d0845852af1b12ee7af8271e5bcccecb846d 100644
(file)
--- a/
drivers/base/soc.c
+++ b/
drivers/base/soc.c
@@
-106,7
+106,7
@@
static void soc_release(struct device *dev)
{
struct soc_device *soc_dev = container_of(dev, struct soc_device, dev);
- ida_
simple_remov
e(&soc_ida, soc_dev->soc_dev_num);
+ ida_
fre
e(&soc_ida, soc_dev->soc_dev_num);
kfree(soc_dev->dev.groups);
kfree(soc_dev);
}
@@
-155,7
+155,7
@@
struct soc_device *soc_device_register(struct soc_device_attribute *soc_dev_attr
soc_attr_groups[1] = soc_dev_attr->custom_attr_group;
/* Fetch a unique (reclaimable) SOC ID. */
- ret = ida_
simple_get(&soc_ida, 0, 0
, GFP_KERNEL);
+ ret = ida_
alloc(&soc_ida
, GFP_KERNEL);
if (ret < 0)
goto out3;
soc_dev->soc_dev_num = ret;