diff mbox series

pinctrl: adi2: Fix build problem

Message ID 20171011100057.9051-1-linus.walleij@linaro.org
State New
Headers show
Series pinctrl: adi2: Fix build problem | expand

Commit Message

Linus Walleij Oct. 11, 2017, 10 a.m. UTC
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 <realmz6@gmail.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
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(+)

-- 
2.13.5

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

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"