Skip to content

Commit f57c084

Browse files
tititiou36Bartosz Golaszewski
authored andcommitted
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>
1 parent 72cef64 commit f57c084

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpio/gpio-mpsse.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ static void gpio_mpsse_ida_remove(void *data)
403403
{
404404
struct mpsse_priv *priv = data;
405405

406-
ida_simple_remove(&gpio_mpsse_ida, priv->id);
406+
ida_free(&gpio_mpsse_ida, priv->id);
407407
}
408408

409409
static int gpio_mpsse_probe(struct usb_interface *interface,
@@ -422,7 +422,7 @@ static int gpio_mpsse_probe(struct usb_interface *interface,
422422
priv->intf = interface;
423423
priv->intf_id = interface->cur_altsetting->desc.bInterfaceNumber;
424424

425-
priv->id = ida_simple_get(&gpio_mpsse_ida, 0, 0, GFP_KERNEL);
425+
priv->id = ida_alloc(&gpio_mpsse_ida, GFP_KERNEL);
426426
if (priv->id < 0)
427427
return priv->id;
428428

0 commit comments

Comments
 (0)