Skip to content

Commit 863dafa

Browse files
Greg UngererGreg Ungerer
authored andcommitted
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>
1 parent b688001 commit 863dafa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/m68k/include/asm/mcfgpio.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
#ifndef mcfgpio_h
99
#define mcfgpio_h
1010

11-
#ifdef CONFIG_GPIOLIB
12-
#include <linux/gpio.h>
13-
#else
14-
1511
int __mcfgpio_get_value(unsigned gpio);
1612
void __mcfgpio_set_value(unsigned gpio, int value);
1713
int __mcfgpio_direction_input(unsigned gpio);
1814
int __mcfgpio_direction_output(unsigned gpio, int value);
1915
int __mcfgpio_request(unsigned gpio);
2016
void __mcfgpio_free(unsigned gpio);
2117

18+
#ifdef CONFIG_GPIOLIB
19+
#include <linux/gpio.h>
20+
#else
21+
2222
/* our alternate 'gpiolib' functions */
2323
static inline int __gpio_get_value(unsigned gpio)
2424
{

0 commit comments

Comments
 (0)