Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Snippets Groups Projects
Commit 4e4438b8 authored by Anton Vorontsov's avatar Anton Vorontsov Committed by Grant Likely
Browse files

gpiolib: Add 'struct gpio_chip' forward declaration for !GPIOLIB case


With CONFIG_GPIOLIB=n, the 'struct gpio_chip' is not declared,
so the following pops up on PowerPC:

  cc1: warnings being treated as errors
  In file included from arch/powerpc/platforms/52xx/mpc52xx_common.c:19:
  include/linux/of_gpio.h:74: warning: 'struct gpio_chip' declared
                              inside parameter list
  include/linux/of_gpio.h:74: warning: its scope is only this definition
                              or declaration, which is probably not what
			      you want
  include/linux/of_gpio.h:75: warning: 'struct gpio_chip' declared
                              inside parameter list
  make[2]: *** [arch/powerpc/platforms/52xx/mpc52xx_common.o] Error 1

This patch fixes the issue by providing the proper forward declaration.

Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 9f1a1fca
Branches
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/errno.h> #include <linux/errno.h>
struct device; struct device;
struct gpio_chip;
/* /*
* Some platforms don't support the GPIO programming interface. * Some platforms don't support the GPIO programming interface.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment