summaryrefslogtreecommitdiff
path: root/arch/m68k
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@kernel.org>2023-09-12 12:07:42 +1000
committerGreg Ungerer <gerg@linux-m68k.org>2023-10-23 08:22:22 +1000
commit863dafa74eceaa7dc45c781566efc5395085f178 (patch)
tree1c7c7c4439967c79cbc7cee656de652439962fca /arch/m68k
parentb6880019ff3ed72b0813b6bcb5c23afdf8b8e75c (diff)
m68k: coldfire: ensure gpio prototypes visible
When building with W=1: CC arch/m68k/coldfire/gpio.o arch/m68k/coldfire/gpio.c:19:5: warning: no previous prototype for ‘__mcfgpio_get_value’ [-Wmissing-prototypes] int __mcfgpio_get_value(unsigned gpio) ^~~~~~~~~~~~~~~~~~~ arch/m68k/coldfire/gpio.c:25:6: warning: no previous prototype for ‘__mcfgpio_set_value’ [-Wmissing-prototypes] void __mcfgpio_set_value(unsigned gpio, int value) ^~~~~~~~~~~~~~~~~~~ arch/m68k/coldfire/gpio.c:50:5: warning: no previous prototype for ‘__mcfgpio_direction_input’ [-Wmissing-prototypes] int __mcfgpio_direction_input(unsigned gpio) ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/m68k/coldfire/gpio.c:65:5: warning: no previous prototype for ‘__mcfgpio_direction_output’ [-Wmissing-prototypes] int __mcfgpio_direction_output(unsigned gpio, int value) ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/m68k/coldfire/gpio.c:96:5: warning: no previous prototype for ‘__mcfgpio_request’ [-Wmissing-prototypes] int __mcfgpio_request(unsigned gpio) ^~~~~~~~~~~~~~~~~ arch/m68k/coldfire/gpio.c:102:6: warning: no previous prototype for ‘__mcfgpio_free’ [-Wmissing-prototypes] void __mcfgpio_free(unsigned gpio) ^~~~~~~~~~~~~~ The local m68k asm version of gpio.h has prototypes for all of these, but they are not always visible depending on the config options enabled. Move the prototypes so they are always visible. Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/include/asm/mcfgpio.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/m68k/include/asm/mcfgpio.h b/arch/m68k/include/asm/mcfgpio.h
index 7abd322c019f..019f24439546 100644
--- a/arch/m68k/include/asm/mcfgpio.h
+++ b/arch/m68k/include/asm/mcfgpio.h
@@ -8,10 +8,6 @@
#ifndef mcfgpio_h
#define mcfgpio_h
-#ifdef CONFIG_GPIOLIB
-#include <linux/gpio.h>
-#else
-
int __mcfgpio_get_value(unsigned gpio);
void __mcfgpio_set_value(unsigned gpio, int value);
int __mcfgpio_direction_input(unsigned gpio);
@@ -19,6 +15,10 @@ int __mcfgpio_direction_output(unsigned gpio, int value);
int __mcfgpio_request(unsigned gpio);
void __mcfgpio_free(unsigned gpio);
+#ifdef CONFIG_GPIOLIB
+#include <linux/gpio.h>
+#else
+
/* our alternate 'gpiolib' functions */
static inline int __gpio_get_value(unsigned gpio)
{