From patchwork Tue Apr 26 08:51:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 66671 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1485837qge; Tue, 26 Apr 2016 01:51:12 -0700 (PDT) X-Received: by 10.98.46.71 with SMTP id u68mr1889902pfu.136.1461660672254; Tue, 26 Apr 2016 01:51:12 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zz12si2316493pab.3.2016.04.26.01.51.12; Tue, 26 Apr 2016 01:51:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752569AbcDZIvL (ORCPT + 4 others); Tue, 26 Apr 2016 04:51:11 -0400 Received: from mail-lf0-f50.google.com ([209.85.215.50]:36605 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752490AbcDZIvJ (ORCPT ); Tue, 26 Apr 2016 04:51:09 -0400 Received: by mail-lf0-f50.google.com with SMTP id u64so8329766lff.3 for ; Tue, 26 Apr 2016 01:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=sX9uTTqK1RGlleLdpNENOH0EVNuPnIy5uOBl7nA8XFw=; b=hW9pHX8n4isTgMoRT87GFjtwoX4NJZ7qc3fg7+Qr7ITB+tPdnpxJK+hDFNamx3s6kG k8JU4DeXlvlzmx4okjdq9RgASCRTA/eJ6h3db8W0ZMPxICdpqTP0EtKmD5zEJIYMsQkc 3WJXSzmRlAL2bOh3rDPaplAzZT0vou1hVti9s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sX9uTTqK1RGlleLdpNENOH0EVNuPnIy5uOBl7nA8XFw=; b=h9u0O1RVms7Zv/pG/rPSQEyMUxt3Szf2eApceVkLUqCeNtHurRJ+gDao5xvyQOgSMp L/mmQmY25IfchOy3AX0GWAk8iYmtLMVL3qI0bMWyEsqph8TtGtx339arwMeIuzTSqh08 ZMClYbjo7Y/QgxX+VP8ZO2H3+XrVzh67r2xW9ePWZFUOIai7GQDNUdg6iQ7QYexBY3iV x42PAltbZJiJxDSS/EyPbCtqr4nowIFpwNTTYkXcjn6sEqINEUtntJtH1iWdsG0Sk/HU ydpdmGfUbauLKFzkoQmAPinNEF6W3JXRTN1NW+c7xne22Zc0oQZAMCbNUYHtoznCngzw GZIA== X-Gm-Message-State: AOPr4FUiTwz8UP1BMUUjmbSjBGfHIagirkOmMxXxvG4El9rAOziDCeGUgUzuqAI9xFgn/Y9R X-Received: by 10.112.220.6 with SMTP id ps6mr760655lbc.16.1461660667831; Tue, 26 Apr 2016 01:51:07 -0700 (PDT) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id o10sm5159752lbp.47.2016.04.26.01.51.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Apr 2016 01:51:07 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org, Alexandre Courbot Cc: Linus Walleij Subject: [PATCH] gpio: move gpiod_set_array_value_priv() Date: Tue, 26 Apr 2016 10:51:03 +0200 Message-Id: <1461660663-17207-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.11 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This renames gpiod_set_array_value_priv() to gpiod_set_array_value_complex() and moves it to the gpiolib.h private header file so we can reuse it in the subsystem. Signed-off-by: Linus Walleij --- drivers/gpio/gpiolib.c | 24 ++++++++++++------------ drivers/gpio/gpiolib.h | 4 ++++ 2 files changed, 16 insertions(+), 12 deletions(-) -- 2.4.11 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 59a0d8e98a04..bb3195d5e3af 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1825,10 +1825,10 @@ static void gpio_chip_set_multiple(struct gpio_chip *chip, } } -static void gpiod_set_array_value_priv(bool raw, bool can_sleep, - unsigned int array_size, - struct gpio_desc **desc_array, - int *value_array) +void gpiod_set_array_value_complex(bool raw, bool can_sleep, + unsigned int array_size, + struct gpio_desc **desc_array, + int *value_array) { int i = 0; @@ -1934,8 +1934,8 @@ void gpiod_set_raw_array_value(unsigned int array_size, { if (!desc_array) return; - gpiod_set_array_value_priv(true, false, array_size, desc_array, - value_array); + gpiod_set_array_value_complex(true, false, array_size, desc_array, + value_array); } EXPORT_SYMBOL_GPL(gpiod_set_raw_array_value); @@ -1956,8 +1956,8 @@ void gpiod_set_array_value(unsigned int array_size, { if (!desc_array) return; - gpiod_set_array_value_priv(false, false, array_size, desc_array, - value_array); + gpiod_set_array_value_complex(false, false, array_size, desc_array, + value_array); } EXPORT_SYMBOL_GPL(gpiod_set_array_value); @@ -2160,8 +2160,8 @@ void gpiod_set_raw_array_value_cansleep(unsigned int array_size, might_sleep_if(extra_checks); if (!desc_array) return; - gpiod_set_array_value_priv(true, true, array_size, desc_array, - value_array); + gpiod_set_array_value_complex(true, true, array_size, desc_array, + value_array); } EXPORT_SYMBOL_GPL(gpiod_set_raw_array_value_cansleep); @@ -2183,8 +2183,8 @@ void gpiod_set_array_value_cansleep(unsigned int array_size, might_sleep_if(extra_checks); if (!desc_array) return; - gpiod_set_array_value_priv(false, true, array_size, desc_array, - value_array); + gpiod_set_array_value_complex(false, true, array_size, desc_array, + value_array); } EXPORT_SYMBOL_GPL(gpiod_set_array_value_cansleep); diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h index e30e5fdb1214..2d9ea5e0cab3 100644 --- a/drivers/gpio/gpiolib.h +++ b/drivers/gpio/gpiolib.h @@ -141,6 +141,10 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np, const char *list_name, int index, enum of_gpio_flags *flags); struct gpio_desc *gpiochip_get_desc(struct gpio_chip *chip, u16 hwnum); +void gpiod_set_array_value_complex(bool raw, bool can_sleep, + unsigned int array_size, + struct gpio_desc **desc_array, + int *value_array); extern struct spinlock gpio_lock; extern struct list_head gpio_devices;