diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2017-10-17 05:46:09 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-10-19 04:12:49 -0400 |
commit | 350bdb84fda89270703907fb4c4fb482e1edbc31 (patch) | |
tree | cdafa891ddc3a07f7a12b125602b517485ef9ca7 /arch/blackfin/kernel | |
parent | 1c363531dd814dc4fe10865722bf6b0f72ce4673 (diff) |
blackfin: Fix local <asm/gpio.h> includes
When making the pin control submenu globally visible, all kinds
of oddities appear, in blackfin a few files were #including
<linux/gpio.h> and relying on that to pull in <asm/gpio.h>.
This was not working when pin control but not GPIOLIB was
selected resulting in a breakage in allmodconfig. The code these
files were using was still there and defined in <asm/gpio.h>
just not pulle in from just including <linux/gpio.h>
Simply add the required includes explicitly in the blackfin
kernel core and everything compiles fine.
Delete the use of the incorrect <linux/gpio.h> where possible.
Add stubs to <asm/gpio.h> for the functions called from PM:
these should probably also depend on !PINCTRL but since the
global CONFIG_PM symbol is used to compile PM support,
we need some more intrusive thing here, to be tested by
Blackfin maintainers.
Cc: Steven Miao <realmz6@gmail.com>
Cc: Huanhuan Feng <huanhuan.feng@analog.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r-- | arch/blackfin/kernel/bfin_gpio.c | 3 | ||||
-rw-r--r-- | arch/blackfin/kernel/debug-mmrs.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index c5d31287de01..63da80bbadf6 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
@@ -15,6 +15,9 @@ | |||
15 | /* FIXME: consumer API required for gpio_set_value() etc, get rid of this */ | 15 | /* FIXME: consumer API required for gpio_set_value() etc, get rid of this */ |
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
18 | #include <asm/gpio.h> | ||
19 | #include <asm/irq_handler.h> | ||
20 | #include <asm/portmux.h> | ||
18 | 21 | ||
19 | #if ANOMALY_05000311 || ANOMALY_05000323 | 22 | #if ANOMALY_05000311 || ANOMALY_05000323 |
20 | enum { | 23 | enum { |
diff --git a/arch/blackfin/kernel/debug-mmrs.c b/arch/blackfin/kernel/debug-mmrs.c index f31ace221392..194773ce109e 100644 --- a/arch/blackfin/kernel/debug-mmrs.c +++ b/arch/blackfin/kernel/debug-mmrs.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/gpio.h> | ||
14 | 13 | ||
15 | #include <asm/blackfin.h> | 14 | #include <asm/blackfin.h> |
16 | #include <asm/gptimers.h> | 15 | #include <asm/gptimers.h> |
@@ -20,6 +19,7 @@ | |||
20 | #include <asm/bfin_serial.h> | 19 | #include <asm/bfin_serial.h> |
21 | #include <asm/bfin5xx_spi.h> | 20 | #include <asm/bfin5xx_spi.h> |
22 | #include <asm/bfin_twi.h> | 21 | #include <asm/bfin_twi.h> |
22 | #include <asm/gpio.h> | ||
23 | 23 | ||
24 | /* Common code defines PORT_MUX on us, so redirect the MMR back locally */ | 24 | /* Common code defines PORT_MUX on us, so redirect the MMR back locally */ |
25 | #ifdef BFIN_PORT_MUX | 25 | #ifdef BFIN_PORT_MUX |