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

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>

authored by

Christophe JAILLET and committed by
Bartosz Golaszewski
f57c0849 72cef641

+2 -2
+2 -2
drivers/gpio/gpio-mpsse.c
··· 403 403 { 404 404 struct mpsse_priv *priv = data; 405 405 406 - ida_simple_remove(&gpio_mpsse_ida, priv->id); 406 + ida_free(&gpio_mpsse_ida, priv->id); 407 407 } 408 408 409 409 static int gpio_mpsse_probe(struct usb_interface *interface, ··· 422 422 priv->intf = interface; 423 423 priv->intf_id = interface->cur_altsetting->desc.bInterfaceNumber; 424 424 425 - priv->id = ida_simple_get(&gpio_mpsse_ida, 0, 0, GFP_KERNEL); 425 + priv->id = ida_alloc(&gpio_mpsse_ida, GFP_KERNEL); 426 426 if (priv->id < 0) 427 427 return priv->id; 428 428