From patchwork Mon Sep 9 20:34:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 1159926 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arndb.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46S0Kh0flSz9sDB for ; Tue, 10 Sep 2019 06:35:36 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391567AbfIIUff (ORCPT ); Mon, 9 Sep 2019 16:35:35 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:35477 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726841AbfIIUfe (ORCPT ); Mon, 9 Sep 2019 16:35:34 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1M42Ss-1i7QNX0dMG-0000SB; Mon, 09 Sep 2019 22:35:15 +0200 From: Arnd Bergmann To: Linus Walleij , Bartosz Golaszewski Cc: Arnd Bergmann , Masahiro Yamada , Hulk Robot , YueHaibing , Hans Verkuil , Stephen Boyd , Brian Masney , Enrico Weigelt , Johan Hovold , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpio: fix incorrect merge of linux/gpio/driver.h Date: Mon, 9 Sep 2019 22:34:59 +0200 Message-Id: <20190909203512.675822-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:h5/cCxSSdt5FyRzyzFCDSMq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9f4tPW Ov4vJCqBcusKI0JFv3hmi7US1yrK+XkysebHIopXK6HDTvT4v8= Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Two otherwise correct patches got merged incorrectly, which leads to build problems when CONFIG_GPIOLIB is disabled: include/linux/gpio/driver.h:722:19: error: static declaration of 'gpiochip_lock_as_irq' follows non-static declaration static inline int gpiochip_lock_as_irq(struct gpio_chip *chip, ^ include/linux/gpio/driver.h:706:5: note: previous declaration is here int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset); ^ include/linux/gpio/driver.h:729:20: error: static declaration of 'gpiochip_unlock_as_irq' follows non-static declaration static inline void gpiochip_unlock_as_irq(struct gpio_chip *chip, ^ include/linux/gpio/driver.h:707:6: note: previous declaration is here void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset); Fixes: 8a6abcd04e4c ("Merge tag 'gpio-v5.4-updates-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel") Fixes: 9091373ab7ea ("gpio: remove less important #ifdef around declarations") Fixes: c7663fa2a663 ("gpio: Move gpiochip_lock/unlock_as_irq to gpio/driver.h") Signed-off-by: Arnd Bergmann Reviewed-by: Brian Masney --- include/linux/gpio/driver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index b74a3bee85e5..fb134ff20f6b 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -702,14 +702,14 @@ void gpiochip_free_own_desc(struct gpio_desc *desc); void devprop_gpiochip_set_names(struct gpio_chip *chip, const struct fwnode_handle *fwnode); -/* lock/unlock as IRQ */ -int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset); -void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset); - #ifdef CONFIG_GPIOLIB struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc); +/* lock/unlock as IRQ */ +int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset); +void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset); + #else /* CONFIG_GPIOLIB */ static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)