Skip to content

Commit

Permalink
gpio: mpsse: Remove usage of the deprecated ida_simple_xx() API
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christophe JAILLET authored and Bartosz Golaszewski committed Nov 22, 2024
1 parent 72cef64 commit f57c084
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpio/gpio-mpsse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;

Expand Down

0 comments on commit f57c084

Please sign in to comment.