projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80c1afe
)
phy: core: Remove usage of the deprecated ida_simple_xx() API
author
Christophe JAILLET
<christophe.jaillet@wanadoo.fr>
Wed, 1 Nov 2023 15:57:57 +0000
(16:57 +0100)
committer
Vinod Koul
<vkoul@kernel.org>
Thu, 16 Nov 2023 11:33:51 +0000
(17:03 +0530)
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/d2323636c6cd2ec22f73a0ae6c2d34ac99b4abd5.1698854255.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/phy-core.c
patch
|
blob
|
history
diff --git
a/drivers/phy/phy-core.c
b/drivers/phy/phy-core.c
index 96a0b1e111f34997f664d63151038cf582c2fb67..d9be6a4d538387fac816d4d46c781ebd84cc29de 100644
(file)
--- a/
drivers/phy/phy-core.c
+++ b/
drivers/phy/phy-core.c
@@
-959,7
+959,7
@@
struct phy *phy_create(struct device *dev, struct device_node *node,
if (!phy)
return ERR_PTR(-ENOMEM);
- id = ida_
simple_get(&phy_ida, 0, 0
, GFP_KERNEL);
+ id = ida_
alloc(&phy_ida
, GFP_KERNEL);
if (id < 0) {
dev_err(dev, "unable to get id\n");
ret = id;
@@
-1232,7
+1232,7
@@
static void phy_release(struct device *dev)
dev_vdbg(dev, "releasing '%s'\n", dev_name(dev));
debugfs_remove_recursive(phy->debugfs);
regulator_put(phy->pwr);
- ida_
simple_remov
e(&phy_ida, phy->id);
+ ida_
fre
e(&phy_ida, phy->id);
kfree(phy);
}