From d1f1668ee6c4d12348caefda6504c5c5663c6f0c Mon Sep 17 00:00:00 2001 From: Louis Li Date: Fri, 28 Mar 2014 18:32:54 +0800 Subject: 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 Reviewed-on: http://git-master/r/408583 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Vinayak Pane Reviewed-by: Bharat Nihalani --- drivers/input/keyboard/gpio_keys.c | 4 ++-- 1 file 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 * - * 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; -- cgit v1.2.3