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: 173421 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp4866714ilq; Mon, 9 Sep 2019 13:35:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaS+TcSXVvLFMcDcad4AXBp1VegJIJFx2nP7WcDCZ6Hi8BJW9bJcuIFzXCyCpFEHWX9oaU X-Received: by 2002:aa7:db12:: with SMTP id t18mr26672129eds.156.1568061339437; Mon, 09 Sep 2019 13:35:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568061339; cv=none; d=google.com; s=arc-20160816; b=G8cj1amzDltacqOMB2hMDKicrU5uIyAH/4AoBWaw7hq4sx7VNmILiHRzUcdo8ji/xz RVfNlWDoixDMlt9e2xvw/BXAib3okX1UOdjIM2dnSrTvfTDE0LdBW9cv9AT1KrVpvPah 0uNOH07ZymSrb0K8GIW1lmdD3MIJx/6r4P+okNknt01QqPTGT9V780brUROdrBSa10B/ SsNh9FUGKuTy407udFgW/qsIhpqH0yQ0DfKV8PSGKbtDFS2wVvLdJOkfYJ8dNBD8XKPZ ZzZytb2yL9YylGS5IzchpW4jR8prAoqGd+Rq3OfND472A3xYouQmXLIbjmujW9iFMHOF B6pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=bzh6o1agKMVdvtU8lWLQHpHVsrCuRCXI8h6+JtNmHfI=; b=O6aR/wxUJhzEk+NZJjOWqe1Mpn/54O0p/AKbfizNuF17lHDCYltOWYml1SaL/y8T0U LVpglMrzgPiSpUeQfp+dCANHHFhVphVmd29izsza8pQA9g2dsCDosOhYMP0LO3ezb2cU KwdSfqk5bn6DCMryvq9nCkl5wGEwawbnoZzLTyajkITFjufvdN9bzO1nN0WqNFZFPZu3 hZ3F31gFu3G5iO6L9Oc9gi2wpUyPNlVl0xgfaRLJL0PuKtPOfb1Di3iEF3Rdpc+5lFOD zziLTk/4R/MV4STQ/YGXkAj0AYO5HOwZq09DsNLrnO5hhqlmZxTkBob7SRba7rEw/Ynl alrw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si8054853edy.227.2019.09.09.13.35.38; Mon, 09 Sep 2019 13:35:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391567AbfIIUff (ORCPT + 5 others); 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/cCxSSdt5FyRzyzFCDSMqQaF4Hg9pI9atK4iqsbR31lQ7KMiY HZAeIg66EFmJSMrNyZ0P/3udIPL7P1Uq1RxcQw39eige+TJduUc+qI84JaCbNmE6pN4562u DT1TXQM7Hlqr3MmgDbtAXSEe5/srat/L/e5wF2ipINDnqAXjq+FY+ttXtWqlmsckjga8ojv EMGEeDY/Hd764j+oJDcSQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:b+UibNyUIXA=:6UWSiK4lOn47hPscpafs31 HqEVEaRbsmhbhyRdmvHhzTuD/aYfFYtVSn3FHljL39ZdJjYaYhZFXgUIw6tm5gkR16MhvuPN/ 3ZfWT4S/0RNCO2jvvsUpDbTTjuTmg46ni4xR6FXbd23KthshPqsNc+sDBV0wzSwJTbmsp/d4S djOnrQR0a2kJYYAVE5OS/1TCf0O6SSh6G08Bc4yOjDzOAhGFK9KJdt7VS/lzy0qB5KkqJhH+w EPCYPeuxuBuwMvzjhUsaRB7/EY38Sers1+TYcPhoHSFixvOdh/MNTaG726z2HpoZS6YNRt+UZ 6bG98fEtKF9TXqFZ4QO5H0QAvZ2Z9QxVaYwMuYzsqpeeljj5QHvJ1RscdQmxy3sZWcgX+oyUR c293x3gUXFSlibU3SXkHtJlJKk9PdI5nHs7U8YRH3D8bNIRwHAEKwjzeUUhl5Bwkr+vQk6OUa GO3a9nw0bFp/mtEQriDKdiZYG1NGXP4Ul7z3xj/xSHugA7JheWv0QaFu+ME89xFY5RcWM/SW8 vdmhWQiN+tWGQoXXvbbIGD9xwzaT+C2p7bvFhGE2FA+zRnwMc7SWHyhdXFmzgme0OD53HW+sw RHnUBuSEmzAD9oknLHCSqNwOg8IxDo2DByNekZi8368oW9YGHDFzaNMIAhTNXNNEfp2mpLa9a jz47ltPFMqwmo6c3Kx3TwoUkhV1MJvZbBTycxjNvuv37U/ohvEOWXUB42MZ+k13nGhWAFdT7w kAeoOBPhOVOKpVgzZv7IGvG1f0povpQU84nP097S4RiFkczPGIiQ6Z0a+5dA+bKMSCp9f4tPW 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 --- include/linux/gpio/driver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.20.0 Reviewed-by: Brian Masney 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)