From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753239AbaKCQdO (ORCPT ); Mon, 3 Nov 2014 11:33:14 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:57965 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753082AbaKCQdK (ORCPT ); Mon, 3 Nov 2014 11:33:10 -0500 From: Felipe Balbi To: , CC: Linux Kernel Mailing List , Linux OMAP Mailing List , , , George Cherian , Felipe Balbi Subject: [PATCH 3/4] extcon: gpio: Always use gpio_get_value_cansleep Date: Mon, 3 Nov 2014 10:32:29 -0600 Message-ID: <1415032350-8459-4-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT In-Reply-To: <1415032350-8459-1-git-send-email-balbi@ti.com> References: <1415032350-8459-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: George Cherian Some gpio's can sleep while reading, so always use gpio_get_value_cansleep to get data. This fixes warning from gpiolib due to wrong API usage. Reviewed-by: Roger Quadros Signed-off-by: George Cherian Signed-off-by: Sekhar Nori Signed-off-by: Felipe Balbi --- drivers/extcon/extcon-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c index 9571e1f..7191d28 100644 --- a/drivers/extcon/extcon-gpio.c +++ b/drivers/extcon/extcon-gpio.c @@ -51,7 +51,7 @@ static void gpio_extcon_work(struct work_struct *work) container_of(to_delayed_work(work), struct gpio_extcon_data, work); - state = gpiod_get_value(data->gpiod); + state = gpiod_get_value_cansleep(data->gpiod); extcon_set_state(data->edev, state); } -- 2.1.0.GIT