diff mbox series

gpio: ucb1400: Use proper header

Message ID 20210820222446.56747-1-linus.walleij@linaro.org
State Accepted
Commit 66df18b3bd74107dd7c196e75ce00d64d7553152
Headers show
Series gpio: ucb1400: Use proper header | expand

Commit Message

Linus Walleij Aug. 20, 2021, 10:24 p.m. UTC
The UCB1400 implements a GPIO driver so it needs to include the
<linux/gpio/driver.h> header, not the legacy <linux/gpio.h> header.
Compile tested on pxa_defconfig.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpio-ucb1400.c | 1 +
 include/linux/ucb1400.h     | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

-- 
2.31.1

Comments

Andy Shevchenko Aug. 21, 2021, 7:38 a.m. UTC | #1
On Sat, Aug 21, 2021 at 1:27 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>

> The UCB1400 implements a GPIO driver so it needs to include the

> <linux/gpio/driver.h> header, not the legacy <linux/gpio.h> header.

> Compile tested on pxa_defconfig.


...

>  #include <linux/module.h>

>  #include <linux/ucb1400.h>

> +#include <linux/gpio/driver.h>


Can you add it in an order?

...

> --- a/include/linux/ucb1400.h

> +++ b/include/linux/ucb1400.h

> @@ -23,7 +23,7 @@

>  #include <sound/ac97_codec.h>

>  #include <linux/mutex.h>

>  #include <linux/platform_device.h>

> -#include <linux/gpio.h>

> +#include <linux/gpio/driver.h>


Ditto (to some extent) and the question here, do you still need it
after adding to the C file?

-- 
With Best Regards,
Andy Shevchenko
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-ucb1400.c b/drivers/gpio/gpio-ucb1400.c
index d2a8644864c3..ab495095e9bc 100644
--- a/drivers/gpio/gpio-ucb1400.c
+++ b/drivers/gpio/gpio-ucb1400.c
@@ -7,6 +7,7 @@ 
 
 #include <linux/module.h>
 #include <linux/ucb1400.h>
+#include <linux/gpio/driver.h>
 
 static int ucb1400_gpio_dir_in(struct gpio_chip *gc, unsigned off)
 {
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h
index 0968ef458447..3a333652184f 100644
--- a/include/linux/ucb1400.h
+++ b/include/linux/ucb1400.h
@@ -23,7 +23,7 @@ 
 #include <sound/ac97_codec.h>
 #include <linux/mutex.h>
 #include <linux/platform_device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/driver.h>
 
 /*
  * UCB1400 AC-link registers