diff options
author | Tyler Wang <tyler.wang@quanta.corp-partner.google.com> | 2024-07-30 20:43:01 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-08-06 14:54:59 +0000 |
commit | 2f2c67da52722cce23e58ec1c7ddaf670ace715f (patch) | |
tree | bd03fa6eaed57ad1a9fac94ecb0bd97ddef90bd2 /src/acpi | |
parent | d94433ef92275cdd6e2b31dae05a1be130337f80 (diff) |
acpi/acpigen_ps2_keybd: Fix total keymap size calculation
This patch move keymap size calculation inside of
has_alpha_num_punct_keys condition. When the condition is not met,
it can prevent total keymaps size calculate incorrectly.
BUG=none
TEST=emerge coreboot pass
Change-Id: I3dcf31d89924c1a8f2768e42065761b361e9ca41
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83694
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'src/acpi')
-rw-r--r-- | src/acpi/acpigen_ps2_keybd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/acpi/acpigen_ps2_keybd.c b/src/acpi/acpigen_ps2_keybd.c index 869120714c..75e0b73bac 100644 --- a/src/acpi/acpigen_ps2_keybd.c +++ b/src/acpi/acpigen_ps2_keybd.c @@ -287,9 +287,10 @@ static void ssdt_generate_keymap(struct acpi_dp *dp, uint8_t num_top_row_keys, keymap = rest_of_keymaps[i]; acpi_dp_add_integer(dp_array, NULL, keymap); } + + total += ARRAY_SIZE(rest_of_keymaps); } - total += ARRAY_SIZE(rest_of_keymaps); printk(BIOS_INFO, "PS2K: Passing %u keymaps to kernel\n", total); acpi_dp_add_array(dp, dp_array); |