From patchwork Mon Dec 10 08:55:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1856081 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id B3BE33FCF2 for ; Mon, 10 Dec 2012 09:00:32 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1ThzAm-0008Iz-40; Mon, 10 Dec 2012 08:57:12 +0000 Received: from mail-wi0-f179.google.com ([209.85.212.179]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1ThzA2-00089v-4X for linux-arm-kernel@lists.infradead.org; Mon, 10 Dec 2012 08:56:27 +0000 Received: by mail-wi0-f179.google.com with SMTP id o1so790898wic.0 for ; Mon, 10 Dec 2012 00:56:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=XyYFhwRYSR7Fj49ib+7A+j59l3wO6+Oyqnbe95jYEz8=; b=XAnFYIxQJ8BMf4/k76fkANxLtzL7MkfAolOKpIgSkd9462czjAEr0UXWrMLMWR4V86 Yg17eq/K17Muo+q9e9rUZ0v3/jcZLcc/WRKCeTeqX4FFIFxAXkGRjyAyEuqeb+i5QTiy 0GAmcoiHmEU+1rCmkSTh425ZXoy3JfPfX+FpiiYlyDVqlJ4baoicjujbc7XxcCaDUdDh bf9gdTgCQmMe/ZtkbyD5/woca4RhId8gwWTWzo0mdQ+DJFpGHBcb92RH517SwlLBOTOy ahIrQkes6ppUlu5c8EsnjX+OyXSTVL20r9xh2HpB9L/I0FBOObEcufYGRVlXieT21c4Q lP6w== Received: by 10.216.150.224 with SMTP id z74mr4964047wej.180.1355129784541; Mon, 10 Dec 2012 00:56:24 -0800 (PST) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id fv2sm9173114wib.4.2012.12.10.00.56.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Dec 2012 00:56:23 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/12] regulator: gpio-regulator: gpio_set_value should use cansleep Date: Mon, 10 Dec 2012 08:55:53 +0000 Message-Id: <1355129761-8088-5-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1355129761-8088-1-git-send-email-lee.jones@linaro.org> References: <1355129761-8088-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlFx0UXpWFP/QmAed6weDzIycrPMln/mOfN+K3HdPuFfQHtZagPOkafHWoCdWcsW/3NOHkT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121210_035626_375800_B799C2D2 X-CRM114-Status: GOOD ( 12.56 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.179 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: ulf.hansson@linaro.org, Mark Brown , Lee Jones , linus.walleij@stericsson.com, arnd@arndb.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org If it's possible for gpio_set_value to sleep, we should be using the *_cansleep call instead. This patch fixes multiple warnings from gpiolib. Cc: Mark Brown Signed-off-by: Lee Jones --- drivers/regulator/gpio-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 5462c28..90f5221 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -82,7 +82,7 @@ static int gpio_regulator_set_voltage(struct regulator_dev *dev, for (ptr = 0; ptr < data->nr_gpios; ptr++) { state = (target & (1 << ptr)) >> ptr; - gpio_set_value(data->gpios[ptr].gpio, state); + gpio_set_value_cansleep(data->gpios[ptr].gpio, state); } data->state = target; @@ -119,7 +119,7 @@ static int gpio_regulator_set_current_limit(struct regulator_dev *dev, for (ptr = 0; ptr < data->nr_gpios; ptr++) { state = (target & (1 << ptr)) >> ptr; - gpio_set_value(data->gpios[ptr].gpio, state); + gpio_set_value_cansleep(data->gpios[ptr].gpio, state); } data->state = target;