Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christophe JAILLET and committed by
Vinod Koul
772dd70a 80c1afe8

+2 -2
+2 -2
drivers/phy/phy-core.c
··· 959 959 if (!phy) 960 960 return ERR_PTR(-ENOMEM); 961 961 962 - id = ida_simple_get(&phy_ida, 0, 0, GFP_KERNEL); 962 + id = ida_alloc(&phy_ida, GFP_KERNEL); 963 963 if (id < 0) { 964 964 dev_err(dev, "unable to get id\n"); 965 965 ret = id; ··· 1232 1232 dev_vdbg(dev, "releasing '%s'\n", dev_name(dev)); 1233 1233 debugfs_remove_recursive(phy->debugfs); 1234 1234 regulator_put(phy->pwr); 1235 - ida_simple_remove(&phy_ida, phy->id); 1235 + ida_free(&phy_ida, phy->id); 1236 1236 kfree(phy); 1237 1237 } 1238 1238