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: 13437 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id F3A3A23E1A for ; Mon, 10 Dec 2012 08:56:26 +0000 (UTC) Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) by fiordland.canonical.com (Postfix) with ESMTP id 83DC1A190D4 for ; Mon, 10 Dec 2012 08:56:26 +0000 (UTC) Received: by mail-ie0-f179.google.com with SMTP id k14so7056818iea.38 for ; Mon, 10 Dec 2012 00:56:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=XyYFhwRYSR7Fj49ib+7A+j59l3wO6+Oyqnbe95jYEz8=; b=N1g8Zn0J1PEOqy4ZoUy0ydmKzlQzaejUTT6PeAYchqjox5waM2hmZ56tbtwbgVj+x/ Bcx6vU9BgRa4WAHsPTiIgusnZcCq0MDHlSaQPROGDCl/++X97JUqlQerxSwpr3ZL9UDX xN0dMCZYVE/ooS3N6ADbB3eTQb/wsQShpefg9HO45zKBXlSm7bDmpSNNTZjh66BQGUq3 rIUaJeUCfd/2FaflK1psVKo0Co7PONGAbPRrENNLBiGZ6/Q+EpFzaqWeROJYwiclAa2P wMLsaSOv5Q+HDdji7yxihWnnvJLaXSCCzCXoBnsouMGiE/RVELBA+tVH2XDdEA4hgD5I WBNQ== Received: by 10.50.152.137 with SMTP id uy9mr5759077igb.62.1355129785985; Mon, 10 Dec 2012 00:56:25 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp54751igt; Mon, 10 Dec 2012 00:56:25 -0800 (PST) Received: by 10.180.74.108 with SMTP id s12mr9355338wiv.12.1355129785036; Mon, 10 Dec 2012 00:56:25 -0800 (PST) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by mx.google.com with ESMTPS id n47si3890124weo.135.2012.12.10.00.56.24 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Dec 2012 00:56:25 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.54 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.54; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.54 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wg0-f54.google.com with SMTP id fg15so1281771wgb.33 for ; Mon, 10 Dec 2012 00:56:24 -0800 (PST) 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 Cc: arnd@arndb.de, linus.walleij@stericsson.com, ulf.hansson@linaro.org, Lee Jones , Mark Brown 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: ALoCoQmX5qnMKn7m8kAFJPrpr8TUyt0viUu85OYIn6InLf7e4b61w90swfDaCjA9r3nAKRR9j4oJ 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;