From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Alexander Graf <graf@amazon.com>,
Peter Maydell <peter.maydell@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Phil Reid <preid@electromag.com.au>,
Harish Jenny K N <harish_kandiga@mentor.com>,
Marc Zyngier <marc.zyngier@arm.com>,
Christoffer Dall <christoffer.dall@arm.com>,
Magnus Damm <magnus.damm@gmail.com>,
linux-gpio@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org, qemu-devel@nongnu.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH/RFC v2 1/5] gpio: Export gpiod_{request,free}() to modular GPIO code
Date: Wed, 11 Sep 2019 16:38:54 +0200 [thread overview]
Message-ID: <20190911143858.13024-2-geert+renesas@glider.be> (raw)
In-Reply-To: <20190911143858.13024-1-geert+renesas@glider.be>
Export the gpiod_request() and gpiod_free() symbols, so modular GPIO
library code can make use of these functions.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
ERROR: "gpiod_free" [drivers/gpio/gpiolib-fwd.ko] undefined!
ERROR: "gpiod_request" [drivers/gpio/gpiolib-fwd.ko] undefined!
Alternatives:
- Force gpiolib-fwd builtin,
- Call gpio_{,request,free}(desc_to_gpio(...)) instead, as the legacy
functions are exported,
- Call gpiod_put() instead of gpiod_free(), as the former is a simple
exported wrapper around the latter. Unfortunately there's no such
alternative for gpiod_request().
---
drivers/gpio/gpiolib.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index f1c1b5d4b00b40a7..dbecf266be5a5a2a 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2733,6 +2733,7 @@ int gpiod_request(struct gpio_desc *desc, const char *label)
return ret;
}
+EXPORT_SYMBOL_GPL(gpiod_request);
static bool gpiod_free_commit(struct gpio_desc *desc)
{
@@ -2777,6 +2778,7 @@ void gpiod_free(struct gpio_desc *desc)
WARN_ON(extra_checks);
}
}
+EXPORT_SYMBOL_GPL(gpiod_free);
/**
* gpiochip_is_requested - return string iff signal was requested
--
2.17.1
next prev parent reply other threads:[~2019-09-11 14:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 14:38 [PATCH/RFC v2 0/5] gpio: Add GPIO Aggregator Driver Geert Uytterhoeven
2019-09-11 14:38 ` Geert Uytterhoeven [this message]
2019-09-11 14:38 ` [PATCH/RFC v2 2/5] gpio: Export gpiochip_get_desc() to modular GPIO code Geert Uytterhoeven
2019-09-11 14:38 ` [PATCH/RFC v2 3/5] gpio: Export gpio_name_to_desc() " Geert Uytterhoeven
2019-09-11 14:38 ` [PATCH/RFC v2 4/5] gpio: Add GPIO Forwarder Helper Geert Uytterhoeven
2019-09-11 14:38 ` [PATCH/RFC v2 5/5] gpio: Add GPIO Aggregator Driver Geert Uytterhoeven
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=20190911143858.13024-2-geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=bgolaszewski@baylibre.com \
--cc=christoffer.dall@arm.com \
--cc=graf@amazon.com \
--cc=harish_kandiga@mentor.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=marc.zyngier@arm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=preid@electromag.com.au \
--cc=qemu-devel@nongnu.org \
/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).