From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753450AbdBTQP4 (ORCPT ); Mon, 20 Feb 2017 11:15:56 -0500 Received: from mga03.intel.com ([134.134.136.65]:32485 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751140AbdBTQPy (ORCPT ); Mon, 20 Feb 2017 11:15:54 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,187,1484035200"; d="scan'208";a="936073752" From: Andy Shevchenko To: Linus Walleij , linux-gpio@vger.kernel.org, Dmitry Torokhov , linux-input@vger.kernel.org, Darren Hart , platform-driver-x86@vger.kernel.org, Benjamin Tissoires , linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 0/4] gpio: make gpiod_count() API consistent Date: Mon, 20 Feb 2017 18:15:45 +0200 Message-Id: <20170220161549.39490-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are three possibilities in gpiod_count(): ACPI, OF, and platform data. Some of them return 0, which requires to be handled separately, though developers rather lazy and just shadow an actual error code. Let's make this API consistent by not allowing 0 in returned value. There are luckily only 3 users right now, one of them handles this properly, the rest is converted in this series. Series is supposed to go through GPIO tree. Andy Shevchenko (4): gpio: acpi: Don't return 0 on acpi_gpio_count() gpio: of: Don't return 0 on dt_gpio_count() platform/x86: surface3_button: Propagate error from gpiod_count() Input: soc_button_array - Propagate error from gpiod_count() drivers/gpio/gpiolib-acpi.c | 4 ++-- drivers/gpio/gpiolib.c | 4 ++-- drivers/input/misc/soc_button_array.c | 5 +++-- drivers/platform/x86/surface3_button.c | 5 +++-- 4 files changed, 10 insertions(+), 8 deletions(-) -- 2.11.0