From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753653AbaHSRGX (ORCPT ); Tue, 19 Aug 2014 13:06:23 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:6226 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752252AbaHSRGU (ORCPT ); Tue, 19 Aug 2014 13:06:20 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Tue, 19 Aug 2014 09:56:44 -0700 From: Alexandre Courbot To: Linus Walleij CC: Mika Westerberg , , , , Alexandre Courbot Subject: [PATCH v2 0/2] gpio: acpi: some sanity fixes Date: Tue, 19 Aug 2014 10:06:07 -0700 Message-ID: <1408467969-21226-1-git-send-email-acourbot@nvidia.com> X-Mailer: git-send-email 2.0.4 X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These two small patches perform some sanity changes in gpiolib-acpi: 1) Stop assuming there is a direct 1:1 mapping between GPIO descriptors and GPIO numbers. This should not be taken for granted and will likely change in the future. GPIO descriptors should be handled like regulators and other allocated resources, i.e. obtained and preserved for later use instead of constantly requested using gpiochip_get_desc() 2) Change the prototype of gpiochip_request_own_desc() to match other functions in driver.h. This results is a simplification of the related code in gpiolib-acpi, which should be a good thing. Changes since v1: - Fixed a misdeclaration of struct gpio_desc - Added Mika's Tested-by Alexandre Courbot (2): gpio: acpi: normalize use of gpiochip_get_desc() gpio: change gpiochip_request_own_desc() prototype Documentation/gpio/driver.txt | 3 ++- drivers/gpio/gpiolib-acpi.c | 30 +++++++++++------------------- drivers/gpio/gpiolib.c | 18 ++++++++++++++---- include/linux/gpio/driver.h | 3 ++- 4 files changed, 29 insertions(+), 25 deletions(-) -- 2.0.4