diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-12-10 20:36:15 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-12-15 15:53:37 +0300 |
commit | 7516f86aa5ec9f3f2ae1c5c12b56eef76c7b1a15 (patch) | |
tree | 9343952ff139c8bfc1fa4dffea558138260c14e4 /drivers/usb/typec/pd.c | |
parent | e4e5f9e3bff79951cef7fd6912049b1cecf8a72d (diff) | |
download | linux-7516f86aa5ec9f3f2ae1c5c12b56eef76c7b1a15.tar.xz |
usb: typec: 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>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/c7b99c4f52649ce6405779fbf9170edc5633fdbb.1702229697.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/pd.c')
-rw-r--r-- | drivers/usb/typec/pd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/typec/pd.c b/drivers/usb/typec/pd.c index 85d015cdbe1f..7f3d61f220f2 100644 --- a/drivers/usb/typec/pd.c +++ b/drivers/usb/typec/pd.c @@ -571,7 +571,7 @@ static void pd_release(struct device *dev) { struct usb_power_delivery *pd = to_usb_power_delivery(dev); - ida_simple_remove(&pd_ida, pd->id); + ida_free(&pd_ida, pd->id); kfree(pd); } @@ -616,7 +616,7 @@ usb_power_delivery_register(struct device *parent, struct usb_power_delivery_des if (!pd) return ERR_PTR(-ENOMEM); - ret = ida_simple_get(&pd_ida, 0, 0, GFP_KERNEL); + ret = ida_alloc(&pd_ida, GFP_KERNEL); if (ret < 0) { kfree(pd); return ERR_PTR(ret); |