[PATCH/RFC v2 1/5] gpio: Export gpiod_{request,free}() to modular GPIO code
From: Geert Uytterhoeven
Date: Wed Sep 11 2019 - 10:39:15 EST
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@xxxxxxxxx>
---
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