[v2] gpio: sa1100: include <mach/generic.h>

Message ID 20230517095301.903567-1-arnd@kernel.org
State New
Headers
Series [v2] gpio: sa1100: include <mach/generic.h> |

Commit Message

Arnd Bergmann May 17, 2023, 9:52 a.m. UTC
  From: Arnd Bergmann <arnd@arndb.de>

sa1100_init_gpio() is declared in a machine specific header so it
can be called from platform code, but the definition is in the device
driver, which causes a warning:

drivers/gpio/gpio-sa1100.c:310:13: error: no previous prototype for 'sa1100_init_gpio' [-Werror=missing-prototypes]

It's already possible to include mach/generic.h from drivers, so add
this one here as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: rebase back on mainline tree
---
 drivers/gpio/gpio-sa1100.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Bartosz Golaszewski May 17, 2023, 9:56 a.m. UTC | #1
On Wed, May 17, 2023 at 11:53 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> sa1100_init_gpio() is declared in a machine specific header so it
> can be called from platform code, but the definition is in the device
> driver, which causes a warning:
>
> drivers/gpio/gpio-sa1100.c:310:13: error: no previous prototype for 'sa1100_init_gpio' [-Werror=missing-prototypes]
>
> It's already possible to include mach/generic.h from drivers, so add
> this one here as well.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: rebase back on mainline tree
> ---
>  drivers/gpio/gpio-sa1100.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
> index edff5e81489f..242dad763ac4 100644
> --- a/drivers/gpio/gpio-sa1100.c
> +++ b/drivers/gpio/gpio-sa1100.c
> @@ -12,6 +12,7 @@
>  #include <soc/sa1100/pwer.h>
>  #include <mach/hardware.h>
>  #include <mach/irqs.h>
> +#include <mach/generic.h>
>
>  struct sa1100_gpio_chip {
>         struct gpio_chip chip;
> --
> 2.39.2
>

Now applied, thanks!

Bart
  

Patch

diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
index edff5e81489f..242dad763ac4 100644
--- a/drivers/gpio/gpio-sa1100.c
+++ b/drivers/gpio/gpio-sa1100.c
@@ -12,6 +12,7 @@ 
 #include <soc/sa1100/pwer.h>
 #include <mach/hardware.h>
 #include <mach/irqs.h>
+#include <mach/generic.h>
 
 struct sa1100_gpio_chip {
 	struct gpio_chip chip;