diff mbox series

[3/3] pinctrl: don't include GPIOLIB private header

Message ID 20231115165001.2932350-4-brgl@bgdev.pl
State New
Headers show
Series pinctrl: don't use gpiod_to_chip() | expand

Commit Message

Bartosz Golaszewski Nov. 15, 2023, 4:50 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

gpio_to_desc() is declared in linux/gpio.h so there's no need to include
gpiolib.h directly.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/pinctrl/core.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Andy Shevchenko Nov. 17, 2023, 9:09 p.m. UTC | #1
On Wed, Nov 15, 2023 at 05:50:01PM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> gpio_to_desc() is declared in linux/gpio.h so there's no need to include
> gpiolib.h directly.

Oh, this is unfortunate we need it...
diff mbox series

Patch

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 0b4d07aea387..e55959e1af5a 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -24,6 +24,7 @@ 
 #include <linux/seq_file.h>
 #include <linux/slab.h>
 
+#include <linux/gpio.h>
 #include <linux/gpio/driver.h>
 
 #include <linux/pinctrl/consumer.h>
@@ -31,10 +32,6 @@ 
 #include <linux/pinctrl/machine.h>
 #include <linux/pinctrl/pinctrl.h>
 
-#ifdef CONFIG_GPIOLIB
-#include "../gpio/gpiolib.h"
-#endif
-
 #include "core.h"
 #include "devicetree.h"
 #include "pinconf.h"