mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-24 11:25:43 +00:00
phy: core: 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. 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>
This commit is contained in:
parent
80c1afe8c5
commit
772dd70a5e
1 changed files with 2 additions and 2 deletions
|
@ -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_remove(&phy_ida, phy->id);
|
||||
ida_free(&phy_ida, phy->id);
|
||||
kfree(phy);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue