From: John Hubbard <jhubbard@nvidia.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>,
<linux-gpio@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"John Hubbard" <jhubbard@nvidia.com>,
Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH] gpio: fix build failure: gpiochip_[un]lock*() static/non-static
Date: Fri, 6 Sep 2019 18:05:34 -0700 [thread overview]
Message-ID: <20190907010534.23713-1-jhubbard@nvidia.com> (raw)
While building with !CONFIG_GPIOLIB, I experienced a build failure,
because driver.h in that configuration supplies both a static and
a non-static version of these routines:
gpiochip_lock_as_irq()
gpiochip_unlock_as_irq()
Fix this by moving the non-static routines under the scope of
CONFIG_GPIOLIB.
Fixes: commit c7663fa2a663 ("gpio: Move gpiochip_lock/unlock_as_irq to gpio/driver.h")
Cc: YueHaibing <yuehaibing@huawei.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
Hi,
This is for today's linux-next.
More background:
It *looks* like the original commit did correctly put the non-static
versions of these routines in CONFIG_GPIOLIB, and the static versions
inside !CONFIG_GPIOLIB, but my git history foo is not strong enough
to figure out how we got here, so I'm not sure if the "Fixes:" tag
really refers to the guilty commit.
thanks,
John Hubbard
NVIDIA
include/linux/gpio/driver.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index b74a3bee85e5..39be896aad38 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -702,13 +702,11 @@ 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);
+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 */
--
2.23.0
next reply other threads:[~2019-09-07 1:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-07 1:05 John Hubbard [this message]
2019-09-07 23:16 ` [PATCH] gpio: fix build failure: gpiochip_[un]lock*() static/non-static Linus Walleij
2019-09-10 23:39 ` John Hubbard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190907010534.23713-1-jhubbard@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).