diff mbox series

[v1,1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h

Message ID 20220628193906.36350-1-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1,1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h | expand

Commit Message

Andy Shevchenko June 28, 2022, 7:39 p.m. UTC
There is nothing directly using of specific interfaces in this driver,
so lets not include the headers.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpio-adp5588.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Linus Walleij June 30, 2022, 11:57 a.m. UTC | #1
On Tue, Jun 28, 2022 at 9:39 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> There is nothing directly using of specific interfaces in this driver,
> so lets not include the headers.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

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

Yours,
Linus Walleij
Bartosz Golaszewski July 6, 2022, 12:23 p.m. UTC | #2
On Tue, Jun 28, 2022 at 9:39 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> There is nothing directly using of specific interfaces in this driver,
> so lets not include the headers.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/gpio/gpio-adp5588.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c
> index e388e75103f4..51ed23ba4645 100644
> --- a/drivers/gpio/gpio-adp5588.c
> +++ b/drivers/gpio/gpio-adp5588.c
> @@ -6,7 +6,6 @@
>   * Copyright 2009-2010 Analog Devices Inc.
>   */
>
> -#include <linux/module.h>
>  #include <linux/kernel.h>
>  #include <linux/slab.h>
>  #include <linux/init.h>
> @@ -14,7 +13,8 @@
>  #include <linux/gpio/driver.h>
>  #include <linux/interrupt.h>
>  #include <linux/irq.h>
> -#include <linux/of_device.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
>
>  #include <linux/platform_data/adp5588.h>
>
> @@ -427,18 +427,16 @@ static const struct i2c_device_id adp5588_gpio_id[] = {
>  };
>  MODULE_DEVICE_TABLE(i2c, adp5588_gpio_id);
>
> -#ifdef CONFIG_OF
>  static const struct of_device_id adp5588_gpio_of_id[] = {
>         { .compatible = "adi," DRV_NAME, },
>         {},
>  };
>  MODULE_DEVICE_TABLE(of, adp5588_gpio_of_id);
> -#endif
>
>  static struct i2c_driver adp5588_gpio_driver = {
>         .driver = {
>                 .name = DRV_NAME,
> -               .of_match_table = of_match_ptr(adp5588_gpio_of_id),
> +               .of_match_table = adp5588_gpio_of_id,
>         },
>         .probe_new = adp5588_gpio_probe,
>         .remove = adp5588_gpio_remove,
> --
> 2.35.1
>

Applied all three, thanks!

Bart
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c
index e388e75103f4..51ed23ba4645 100644
--- a/drivers/gpio/gpio-adp5588.c
+++ b/drivers/gpio/gpio-adp5588.c
@@ -6,7 +6,6 @@ 
  * Copyright 2009-2010 Analog Devices Inc.
  */
 
-#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/init.h>
@@ -14,7 +13,8 @@ 
 #include <linux/gpio/driver.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
-#include <linux/of_device.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
 
 #include <linux/platform_data/adp5588.h>
 
@@ -427,18 +427,16 @@  static const struct i2c_device_id adp5588_gpio_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, adp5588_gpio_id);
 
-#ifdef CONFIG_OF
 static const struct of_device_id adp5588_gpio_of_id[] = {
 	{ .compatible = "adi," DRV_NAME, },
 	{},
 };
 MODULE_DEVICE_TABLE(of, adp5588_gpio_of_id);
-#endif
 
 static struct i2c_driver adp5588_gpio_driver = {
 	.driver = {
 		.name = DRV_NAME,
-		.of_match_table = of_match_ptr(adp5588_gpio_of_id),
+		.of_match_table = adp5588_gpio_of_id,
 	},
 	.probe_new = adp5588_gpio_probe,
 	.remove = adp5588_gpio_remove,