gpiolib: switch to simpler IDA interface
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 8 Sep 2020 13:12:25 +0000 (15:12 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 14 Sep 2020 08:52:41 +0000 (10:52 +0200)
commit8d4a85b6abd3cd91234d1760c0dda780767d3b84
tree19a944d3a53d1f15567df13139e83e30218784dc
parent425c5b3e1714dce47064a1be4e00d783e89bc318
gpiolib: switch to simpler IDA interface

We don't need to specify any ranges when allocating IDs so we can switch
to ida_alloc() and ida_free() instead of the ida_simple_ counterparts.

ida_simple_get(ida, 0, 0, gfp) is equivalent to
ida_alloc_range(ida, 0, UINT_MAX, gfp) which is equivalent to
ida_alloc(ida, gfp). Note: IDR will never actually allocate an ID
larger than INT_MAX.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpiolib.c