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>
This commit is contained in:
parent
d94433ef92
commit
2f2c67da52
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user