From patchwork Mon Nov 3 16:32:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 5218171 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 25044C11AC for ; Mon, 3 Nov 2014 16:33:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64B952015A for ; Mon, 3 Nov 2014 16:33:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 901DE200D6 for ; Mon, 3 Nov 2014 16:33:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753198AbaKCQdM (ORCPT ); Mon, 3 Nov 2014 11:33:12 -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 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id sA3GX1dT025319; Mon, 3 Nov 2014 10:33:01 -0600 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA3GX1CE008725; Mon, 3 Nov 2014 10:33:01 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Mon, 3 Nov 2014 10:33:01 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA3GX0tA012576; Mon, 3 Nov 2014 10:33:01 -0600 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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); }