ACPI: scan: Use ida_alloc() instead of ida_simple_get()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 10 Feb 2022 20:05:33 +0000 (21:05 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 18 Feb 2022 19:16:34 +0000 (20:16 +0100)
commitad2f3b08d1ab17e481df753aae221f085fe1cc8a
treecf9e93c1ad7513e7240192a18ef61b9651678b28
parent754e0b0e35608ed5206d6a67a791563c631cec07
ACPI: scan: Use ida_alloc() instead of ida_simple_get()

As recommended in include/linux/idr.h, use ida_alloc() instead of
ida_simple_get() for creating unique device object names and for
symmetry replace ida_simple_remove() with ida_free() (and fix up
the related overly long code line while at it).

Also drop the ACPI_MAX_DEVICE_INSTANCES limit that is not necessary
any more and may not be sufficient for future platforms.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/acpi/internal.h
drivers/acpi/scan.c