Skip to contentSkip to conversation

gpio: sa1100: include <mach/generic.h>

PATCH Superseded Arnd Bergmann 3 participants 3 messages May 16, 2023 – May 17, 2023 GPIO

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: sa1100: include <mach/generic.h>

From: Arnd Bergmann <[email protected]>

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.

---
 drivers/gpio/gpio-sa1100.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-sa1100.c +1 -0
index 342a59ea489a..3b1cc8462fcb 100644
@@ -13,6 +13,7 @@
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/irqs.h>
+#include <mach/generic.h>
 
 struct sa1100_gpio_chip {
 	struct gpio_chip chip;
Signature · 1 line
2.39.2
#1 lore raw
Quoted 22 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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.

---
 drivers/gpio/gpio-sa1100.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-sa1100.c +0 -0
index 342a59ea489a..3b1cc8462fcb 100644

drivers/gpio/gpio-sa1100.c line 14

Quoted 2 lines
drivers/gpio/gpio-sa1100.c +0 -0
@@ -13,6 +13,7 @@
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>

This doesn't apply on top of my branch (neither on next) because of this line. I can't see where this was added. Any hint?

Bart

Quoted 8 lines
drivers/gpio/gpio-sa1100.c +1 -1
 #include <mach/irqs.h>
+#include <mach/generic.h>
 
 struct sa1100_gpio_chip {
        struct gpio_chip chip;
--

2.39.2

#2 lore raw
Quoted 18 lines · Bartosz Golaszewski
Quoted 17 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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.

---
 drivers/gpio/gpio-sa1100.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 10 lines

drivers/gpio/gpio-sa1100.c line 14

Quoted 7 lines
drivers/gpio/gpio-sa1100.c +0 -0
index 342a59ea489a..3b1cc8462fcb 100644
@@ -13,6 +13,7 @@
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>

This doesn't apply on top of my branch (neither on next) because of this line. I can't see where this was added. Any hint?

My mistake, my working tree had some experimental patches in it.

I'll send a v2.

Arnd