pinctrl: adi2: Fix build problem

Message ID
State New
Headers show
  • pinctrl: adi2: Fix build problem
Related show

Commit Message

Linus Walleij Oct. 11, 2017, 10 a.m.
The build robot is complaining on Blackfin:

drivers/pinctrl/pinctrl-adi2.c: In function 'port_setup':
>> drivers/pinctrl/pinctrl-adi2.c:221:21: error: dereferencing

   pointer to incomplete type 'struct gpio_port_t'
      writew(readw(&regs->port_fer) & ~BIT(offset),
drivers/pinctrl/pinctrl-adi2.c: In function 'adi_gpio_ack_irq':
>> drivers/pinctrl/pinctrl-adi2.c:266:18: error: dereferencing

pointer to incomplete type 'struct bfin_pint_regs'
      if (readl(&regs->invert_set) & pintbit)
It seems the driver need to include <asm/gpio.h> and <asm/irq.h>
to compile.

Cc: Steven Miao <>
Cc: Sonic Zhang <>
Signed-off-by: Linus Walleij <>

Sonic: tell me if you know what is going on. This driver *IS*
       in use, right?
 drivers/pinctrl/pinctrl-adi2.c | 2 ++
 1 file changed, 2 insertions(+)


To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to
More majordomo info at


diff --git a/drivers/pinctrl/pinctrl-adi2.c b/drivers/pinctrl/pinctrl-adi2.c
index 56aa181084ac..eb9ac0853008 100644
--- a/drivers/pinctrl/pinctrl-adi2.c
+++ b/drivers/pinctrl/pinctrl-adi2.c
@@ -23,6 +23,8 @@ 
 #include <linux/syscore_ops.h>
 #include <linux/gpio.h>
 #include <asm/portmux.h>
+#include <asm/gpio.h>
+#include <asm/irq.h>
 #include "pinctrl-adi2.h"
 #include "core.h"