From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934010AbbIVSHe (ORCPT ); Tue, 22 Sep 2015 14:07:34 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:42946 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933527AbbIVRyB (ORCPT ); Tue, 22 Sep 2015 13:54:01 -0400 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Vincent Pelletier , Dmitry Torokhov , Kamal Mostafa Subject: [PATCH 3.19.y-ckt 075/102] Input: gpio_keys_polled - request GPIO pin as input. Date: Tue, 22 Sep 2015 10:52:11 -0700 Message-Id: <1442944358-1248-76-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442944358-1248-1-git-send-email-kamal@canonical.com> References: <1442944358-1248-1-git-send-email-kamal@canonical.com> X-Extended-Stable: 3.19 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.19.8-ckt7 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Vincent Pelletier commit 1ae5ddb6f8837558928a1a694c7b8af7f09fdd21 upstream. GPIOF_IN flag was lost in: Commit 633a21d80b4a("input: gpio_keys_polled: Add support for GPIO descriptors"). Without this flag, legacy code path (for non-descriptor GPIO declarations) would configure GPIO as output (0 meaning GPIOF_DIR_OUT | GPIOF_INIT_LOW). Signed-off-by: Vincent Pelletier Reviewed-by: Mika Westerberg Signed-off-by: Dmitry Torokhov Signed-off-by: Kamal Mostafa --- drivers/input/keyboard/gpio_keys_polled.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index 90df4df..959b826 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@ -246,7 +246,7 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) * convert it to descriptor. */ if (!button->gpiod && gpio_is_valid(button->gpio)) { - unsigned flags = 0; + unsigned flags = GPIOF_IN; if (button->active_low) flags |= GPIOF_ACTIVE_LOW; -- 1.9.1