diff mbox series

extcon: usb-gpio: Use the right includes

Message ID 20210715190606.429251-1-linus.walleij@linaro.org
State Accepted
Commit 57869c1174287c7092226a80ca1b1c9f9363d9a5
Headers show
Series extcon: usb-gpio: Use the right includes | expand

Commit Message

Linus Walleij July 15, 2021, 7:06 p.m. UTC
The USB GPIO extcon driver does not use any of the legacy
includes <linux/gpio.h> or <linux/of_gpio.h> but
exploits the fact that this brings in <linux/mod_device_table.h>.
Fix this up by using the right includes.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/extcon/extcon-usb-gpio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.31.1

Comments

Andy Shevchenko July 15, 2021, 9:36 p.m. UTC | #1
On Thu, Jul 15, 2021 at 10:35 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>

> The USB GPIO extcon driver does not use any of the legacy

> includes <linux/gpio.h> or <linux/of_gpio.h> but

> exploits the fact that this brings in <linux/mod_device_table.h>.

> Fix this up by using the right includes.


I like it!
Only one comment below, after addressing,
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>


>

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

>  drivers/extcon/extcon-usb-gpio.c | 3 +--

>  1 file changed, 1 insertion(+), 2 deletions(-)

>

> diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c

> index f06be6d4e2a9..0cb440bdd5cb 100644

> --- a/drivers/extcon/extcon-usb-gpio.c

> +++ b/drivers/extcon/extcon-usb-gpio.c

> @@ -7,18 +7,17 @@

>   */

>

>  #include <linux/extcon-provider.h>

> -#include <linux/gpio.h>

>  #include <linux/gpio/consumer.h>

>  #include <linux/init.h>

>  #include <linux/interrupt.h>

>  #include <linux/irq.h>

>  #include <linux/kernel.h>

>  #include <linux/module.h>

> -#include <linux/of_gpio.h>

>  #include <linux/platform_device.h>

>  #include <linux/slab.h>

>  #include <linux/workqueue.h>

>  #include <linux/pinctrl/consumer.h>


> +#include <linux/mod_devicetable.h>


Can it be squeezed more or less in an ordered manner?
(before module.h I suppose)

>

>  #define USB_GPIO_DEBOUNCE_MS   20      /* ms */

>

> --

> 2.31.1

>



-- 
With Best Regards,
Andy Shevchenko
Chanwoo Choi July 23, 2021, 5:47 a.m. UTC | #2
On 7/16/21 4:06 AM, Linus Walleij wrote:
> The USB GPIO extcon driver does not use any of the legacy

> includes <linux/gpio.h> or <linux/of_gpio.h> but

> exploits the fact that this brings in <linux/mod_device_table.h>.

> Fix this up by using the right includes.

> 

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

>  drivers/extcon/extcon-usb-gpio.c | 3 +--

>  1 file changed, 1 insertion(+), 2 deletions(-)

> 

> diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c

> index f06be6d4e2a9..0cb440bdd5cb 100644

> --- a/drivers/extcon/extcon-usb-gpio.c

> +++ b/drivers/extcon/extcon-usb-gpio.c

> @@ -7,18 +7,17 @@

>   */

>  

>  #include <linux/extcon-provider.h>

> -#include <linux/gpio.h>

>  #include <linux/gpio/consumer.h>

>  #include <linux/init.h>

>  #include <linux/interrupt.h>

>  #include <linux/irq.h>

>  #include <linux/kernel.h>

>  #include <linux/module.h>

> -#include <linux/of_gpio.h>

>  #include <linux/platform_device.h>

>  #include <linux/slab.h>

>  #include <linux/workqueue.h>

>  #include <linux/pinctrl/consumer.h>

> +#include <linux/mod_devicetable.h>

>  

>  #define USB_GPIO_DEBOUNCE_MS	20	/* ms */

>  

> 


Applied it. Thanks.

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics
diff mbox series

Patch

diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c
index f06be6d4e2a9..0cb440bdd5cb 100644
--- a/drivers/extcon/extcon-usb-gpio.c
+++ b/drivers/extcon/extcon-usb-gpio.c
@@ -7,18 +7,17 @@ 
  */
 
 #include <linux/extcon-provider.h>
-#include <linux/gpio.h>
 #include <linux/gpio/consumer.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/workqueue.h>
 #include <linux/pinctrl/consumer.h>
+#include <linux/mod_devicetable.h>
 
 #define USB_GPIO_DEBOUNCE_MS	20	/* ms */