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: 40038 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 64E0521894 for ; Mon, 3 Nov 2014 16:33:24 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id e51sf3064189eek.2 for ; Mon, 03 Nov 2014 08:33:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=GOiwav7Vav9xBMxgpfRlDFcOStAqCWiwGd4ZwX+PDlU=; b=DWH92OGrGul/YS5SUe1jjssZ2BuFjY01xTFz5bNbiOfJ7ZBlZR64551KeYupe5+JTf gRoP+8AIZ5sm1WHY/UtSGmyQb0P47bEkUr/bZaV21GMe7XDc9zlCKfiV+dVRZAv/D7mY iOUPsxLF3X9ua8AWgkIrzC9fnHKyLxAorkgdCmMwVe/D6qMJR7pzR0DEsC3hEr8kIdDL KYYATEmoMW+EinYbN/XJTqmjg6IZisBp9YX/wAWBxZj0Vj/CSYEzKJbYreWiIkeY7fD4 UwI7cAmACraZE+P6gUHdo/9YEjjsB+zhbabwvZXCqATTosNWqrrBqrJNuBsIvC2c8ubv az3g== X-Gm-Message-State: ALoCoQnySXLvHDuZeLrFUL2cDkvGax7ngXLfgfbd5/M3za4upjBG7+YLRzrnkeMu8lm4FeHTxb3c X-Received: by 10.112.41.228 with SMTP id i4mr7595576lbl.0.1415032403655; Mon, 03 Nov 2014 08:33:23 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.25.165 with SMTP id d5ls759091lag.1.gmail; Mon, 03 Nov 2014 08:33:23 -0800 (PST) X-Received: by 10.112.200.34 with SMTP id jp2mr52201502lbc.1.1415032403481; Mon, 03 Nov 2014 08:33:23 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id z2si33080631lae.116.2014.11.03.08.33.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Nov 2014 08:33:23 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id n15so1623343lbi.6 for ; Mon, 03 Nov 2014 08:33:23 -0800 (PST) X-Received: by 10.152.116.102 with SMTP id jv6mr52321000lab.40.1415032403166; Mon, 03 Nov 2014 08:33:23 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.141.34 with SMTP id rl2csp17407lbb; Mon, 3 Nov 2014 08:33:22 -0800 (PST) X-Received: by 10.69.26.38 with SMTP id iv6mr1907545pbd.154.1415032401253; Mon, 03 Nov 2014 08:33:21 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si15696826pdj.98.2014.11.03.08.33.20 for ; Mon, 03 Nov 2014 08:33:21 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753240AbaKCQdO (ORCPT + 25 others); 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 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-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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); }