summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2024-11-22 13:45:45 +0100
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-11-22 15:23:31 +0100
commitf57c084928661969a337c731cd05e1da97320829 (patch)
tree31201746920e6aa8e2fcd7d8245bbb76903b9bc2
parent72cef64180de04a7b055b4773c138d78f4ebdb77 (diff)
gpio: mpsse: 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/2ce706d3242b9d3e4b9c20c0a7d9a8afcf8897ec.1729423829.git.christophe.jaillet@wanadoo.fr Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-rw-r--r--drivers/gpio/gpio-mpsse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-mpsse.c b/drivers/gpio/gpio-mpsse.c
index 9ef24449126a..3ea32c5e33d1 100644
--- a/drivers/gpio/gpio-mpsse.c
+++ b/drivers/gpio/gpio-mpsse.c
@@ -403,7 +403,7 @@ static void gpio_mpsse_ida_remove(void *data)
{
struct mpsse_priv *priv = data;
- ida_simple_remove(&gpio_mpsse_ida, priv->id);
+ ida_free(&gpio_mpsse_ida, priv->id);
}
static int gpio_mpsse_probe(struct usb_interface *interface,
@@ -422,7 +422,7 @@ static int gpio_mpsse_probe(struct usb_interface *interface,
priv->intf = interface;
priv->intf_id = interface->cur_altsetting->desc.bInterfaceNumber;
- priv->id = ida_simple_get(&gpio_mpsse_ida, 0, 0, GFP_KERNEL);
+ priv->id = ida_alloc(&gpio_mpsse_ida, GFP_KERNEL);
if (priv->id < 0)
return priv->id;