summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-03-18 14:03:10 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-03-18 14:03:10 +0100
commitbf978a83ed1db2806ee45284393b27cd59aa6552 (patch)
tree6617e3aa3979faa1628bd18ca5ca45466a132e90 /drivers/acpi/scan.c
parentRevert "ACPI: scan: Do not add device IDs from _CID if _HID is not valid" (diff)
parentACPI: scan: Use ida_alloc() instead of ida_simple_get() (diff)
downloadlinux-bf978a83ed1db2806ee45284393b27cd59aa6552.tar.xz
linux-bf978a83ed1db2806ee45284393b27cd59aa6552.zip
Merge back ACPI device enumeration material for v5.18.
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 8b2e5ef15559..5ffd87ac42b3 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -477,7 +477,8 @@ static void acpi_device_del(struct acpi_device *device)
list_for_each_entry(acpi_device_bus_id, &acpi_bus_id_list, node)
if (!strcmp(acpi_device_bus_id->bus_id,
acpi_device_hid(device))) {
- ida_simple_remove(&acpi_device_bus_id->instance_ida, device->pnp.instance_no);
+ ida_free(&acpi_device_bus_id->instance_ida,
+ device->pnp.instance_no);
if (ida_is_empty(&acpi_device_bus_id->instance_ida)) {
list_del(&acpi_device_bus_id->node);
kfree_const(acpi_device_bus_id->bus_id);
@@ -642,7 +643,7 @@ static int acpi_device_set_name(struct acpi_device *device,
struct ida *instance_ida = &acpi_device_bus_id->instance_ida;
int result;
- result = ida_simple_get(instance_ida, 0, ACPI_MAX_DEVICE_INSTANCES, GFP_KERNEL);
+ result = ida_alloc(instance_ida, GFP_KERNEL);
if (result < 0)
return result;