@@ -288,7 +288,7 @@ static int gpiodev_add_to_list(struct gpio_device *gdev)
/*
* Convert a GPIO name to its descriptor
*/
-static struct gpio_desc *gpio_name_to_desc(const char * const name)
+struct gpio_desc *gpio_name_to_desc(const char * const name)
{
struct gpio_device *gdev;
unsigned long flags;
@@ -315,6 +315,7 @@ static struct gpio_desc *gpio_name_to_desc(const char * const name)
return NULL;
}
+EXPORT_SYMBOL_GPL(gpio_name_to_desc);
/*
* Takes the names from gc->names and checks if they are all unique. If they
@@ -117,6 +117,7 @@ struct gpio_desc {
const char *name;
};
+struct gpio_desc *gpio_name_to_desc(const char * const name);
int gpiod_request(struct gpio_desc *desc, const char *label);
void gpiod_free(struct gpio_desc *desc);
int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,
Make gpio_name_to_desc() global, and export its symbol, so modular GPIO driver can make use of this function. This will be used by the GPIO Aggregator. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- drivers/gpio/gpiolib.c | 3 ++- drivers/gpio/gpiolib.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)