diff options
author | Louis Li <louli@nvidia.com> | 2014-03-28 18:32:54 +0800 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-05-14 14:06:32 -0700 |
commit | d1f1668ee6c4d12348caefda6504c5c5663c6f0c (patch) | |
tree | 9e06e556b5466457971640d52e0262b12a0f6c52 | |
parent | e019c0ef12b2ff5f667c21010865b1962c7a94c8 (diff) |
input: gpio-keys: change wakeup_key's init value
KEY_RESERVED is 0 and the keycode of "Hall Effect Sensor" is also 0.
This causes POWER_KEY_DOWN event to be reported twice while resuming
from LP0 by pressing power key.
Bug 1489955
Change-Id: Ib583f92155f785618430a3b1ed75eb28015ba977
Reviewed-on: http://git-master/r/389703
(cherry picked from commit 8ed070220e154fb46fd8bd378915a326cf29db42)
Signed-off-by: Louis Li <louli@nvidia.com>
Reviewed-on: http://git-master/r/408583
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 78333db53db3..3dbdb7f5cc0a 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -4,7 +4,7 @@ * Copyright 2005 Phil Blundell * Copyright 2010, 2011 David Jander <david@protonic.nl> * - * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2010-2014, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -916,7 +916,7 @@ static int gpio_keys_resume_noirq(struct device *dev) struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev); struct platform_device *pdev = to_platform_device(dev); struct gpio_keys_platform_data *pdata = pdev->dev.platform_data; - int wakeup_key = KEY_RESERVED; + int wakeup_key = -1; int wakeup_irq = get_wakeup_reason_irq(); int i; |