Skip to content

Commit 772dd70

Browse files
tititiou36vinodkoul
authored andcommitted
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>
1 parent 80c1afe commit 772dd70

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/phy/phy-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ struct phy *phy_create(struct device *dev, struct device_node *node,
959959
if (!phy)
960960
return ERR_PTR(-ENOMEM);
961961

962-
id = ida_simple_get(&phy_ida, 0, 0, GFP_KERNEL);
962+
id = ida_alloc(&phy_ida, GFP_KERNEL);
963963
if (id < 0) {
964964
dev_err(dev, "unable to get id\n");
965965
ret = id;
@@ -1232,7 +1232,7 @@ static void phy_release(struct device *dev)
12321232
dev_vdbg(dev, "releasing '%s'\n", dev_name(dev));
12331233
debugfs_remove_recursive(phy->debugfs);
12341234
regulator_put(phy->pwr);
1235-
ida_simple_remove(&phy_ida, phy->id);
1235+
ida_free(&phy_ida, phy->id);
12361236
kfree(phy);
12371237
}
12381238

0 commit comments

Comments
 (0)