mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
The decrementation of acpi_device_bus_id->instance_no in acpi_device_del() is incorrect, because it may cause a duplicate instance number to be allocated next time a device with the same acpi_device_bus_id is added. Replace above mentioned approach by using IDA framework. While at it, define the instance range to be [0, 4096). Fixes:e49bd2dd5a("ACPI: use PNPID:instance_no as bus_id of ACPI device") Fixes:ca9dc8d42b("ACPI / scan: Fix acpi_bus_id_list bookkeeping") Signed-off-by: Andy Shevchenko <[email protected]> Cc: 4.10+ <[email protected]> # 4.10+ Signed-off-by: Rafael J. Wysocki <[email protected]>