diff options
author | John Garry <john.garry@huawei.com> | 2018-08-07 09:15:05 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-08-09 04:51:49 -0400 |
commit | a6f0729508df6a067c4a074ec187ecd9d2457a6b (patch) | |
tree | afc63b484515d71a3035cdb7e62984d787f9f6b4 | |
parent | 1ffaddd029c867d134a1dde39f540dcc8c52e274 (diff) |
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>
-rw-r--r-- | drivers/acpi/scan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 970dd87d347c..199c8ea6896c 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -1528,7 +1528,7 @@ static int acpi_check_serial_bus_slave(struct acpi_resource *ares, void *data) | |||
1528 | static bool acpi_is_indirect_io_slave(struct acpi_device *device) | 1528 | static bool acpi_is_indirect_io_slave(struct acpi_device *device) |
1529 | { | 1529 | { |
1530 | struct acpi_device *parent = device->parent; | 1530 | struct acpi_device *parent = device->parent; |
1531 | const struct acpi_device_id indirect_io_hosts[] = { | 1531 | static const struct acpi_device_id indirect_io_hosts[] = { |
1532 | {"HISI0191", 0}, | 1532 | {"HISI0191", 0}, |
1533 | {} | 1533 | {} |
1534 | }; | 1534 | }; |