diff mbox

[RESEND] toshiba_acpi: Initialize hotkey_event_type variable

Message ID 1446654506-3730-1-git-send-email-coproscefalo@gmail.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Azael Avalos Nov. 4, 2015, 4:28 p.m. UTC
Commit 23f8f4326a15 ("toshiba_acpi: Fix hotkeys registration on some
toshiba models") fixed an issue on some laptops regarding hotkeys
registration, however, if failed to address the initialization of the
hotkey_event_type variable, and thus, it can lead to potential
unwanted effects as the variable is being checked.

This patch initializes such variable to avoid such unwanted effects.

Cc: <stable@vger.kernel.org> # 4.1+
Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
---
 drivers/platform/x86/toshiba_acpi.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Darren Hart Nov. 4, 2015, 4:47 p.m. UTC | #1
On Wed, Nov 04, 2015 at 09:28:26AM -0700, Azael Avalos wrote:
> Commit 23f8f4326a15 ("toshiba_acpi: Fix hotkeys registration on some
> toshiba models") fixed an issue on some laptops regarding hotkeys
> registration, however, if failed to address the initialization of the
> hotkey_event_type variable, and thus, it can lead to potential
> unwanted effects as the variable is being checked.
> 
> This patch initializes such variable to avoid such unwanted effects.
> 
> Cc: <stable@vger.kernel.org> # 4.1+
> Signed-off-by: Azael Avalos <coproscefalo@gmail.com>

Applied, thanks Azael.
Darren Hart Nov. 6, 2015, 12:11 a.m. UTC | #2
On Wed, Nov 04, 2015 at 09:28:26AM -0700, Azael Avalos wrote:
> Commit 23f8f4326a15 ("toshiba_acpi: Fix hotkeys registration on some

Note that the above commit ID does not exist in mainline. The corresponding ID
is 53147b6cabee5e8d1997b5682fcc0c3b72ddf9c2. Please always use the mainling
commit ID (as opposed to one from your development tree) when referring to a
commit. I've corrected this it the version I'll submit to Linus.
diff mbox

Patch

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index beb709f..c013029 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -2665,6 +2665,7 @@  static int toshiba_acpi_add(struct acpi_device *acpi_dev)
 	ret = toshiba_function_keys_get(dev, &dev->special_functions);
 	dev->kbd_function_keys_supported = !ret;
 
+	dev->hotkey_event_type = 0;
 	if (toshiba_acpi_setup_keyboard(dev))
 		pr_info("Unable to activate hotkeys\n");