]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / scan: Add static attribute to indirect_io_hosts[]
authorJohn Garry <john.garry@huawei.com>
Tue, 7 Aug 2018 13:15:05 +0000 (21:15 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 9 Aug 2018 08:51:49 +0000 (10:51 +0200)
commitdefbab7553da95017fba7afa4ac90dc3c9f185ec
treeafc63b484515d71a3035cdb7e62984d787f9f6b4
parentdf71e18b75088bde12f4c3d5e5841e11a140d1f9
ACPI / scan: Add static attribute to indirect_io_hosts[]

Array indirect_io_hosts[] is declared in acpi_is_indirect_io_slave() as a
const array, which means that the array will be re-built for each call.

Optimise by adding the static attribute, which means that the array is
added to const-data pool and not re-built per function call.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c