提交 a6f07295 编写于 作者: J John Garry 提交者: Rafael J. Wysocki

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: NHans de Goede <hdegoede@redhat.com>
Signed-off-by: NJohn Garry <john.garry@huawei.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 1ffaddd0
......@@ -1528,7 +1528,7 @@ static int acpi_check_serial_bus_slave(struct acpi_resource *ares, void *data)
static bool acpi_is_indirect_io_slave(struct acpi_device *device)
{
struct acpi_device *parent = device->parent;
const struct acpi_device_id indirect_io_hosts[] = {
static const struct acpi_device_id indirect_io_hosts[] = {
{"HISI0191", 0},
{}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册