Skip to contentSkip to conversation

Input: twl4030-pwrbutton - add missing of.h include

PATCH In review Dmitry Torokhov 4 participants 12 messages Sep 27, 2022 – Sep 28, 2022

Subsystems (6)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/4 Input: twl4030-pwrbutton - add missing of.h include

The driver is using of_match_ptr() and therefore needs to include of.h header.

---
 drivers/input/misc/twl4030-pwrbutton.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/misc/twl4030-pwrbutton.c +1 -0
index b307cca17022..e3ee0638ffba 100644
@@ -26,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/mfd/twl.h>
 
Signature · 1 line
2.38.0.rc1.362.ged0d419d3c-goog
author maintainer
#1 lore raw

PATCH 2/4 watchdog: twl4030_wdt: add missing of.h include

The driver is using of_device_id and therefore needs to include of.h header. We used to get this definition indirectly via inclusion of matrix_keypad.h from twl.h, but we are cleaning up matrix_keypad.h from unnecessary includes.

---
 drivers/watchdog/twl4030_wdt.c | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/twl4030_wdt.c +1 -0
index 355e428c0b99..e715ac1369a0 100644
@@ -9,6 +9,7 @@
 #include <linux/types.h>
 #include <linux/slab.h>
 #include <linux/kernel.h>
+#include <linux/of.h>
 #include <linux/watchdog.h>
 #include <linux/platform_device.h>
 #include <linux/mfd/twl.h>
Signature · 1 line
2.38.0.rc1.362.ged0d419d3c-goog
maintainer Reviewed-by on v1 2/4
#2 lore raw

Re: [PATCH 2/4] watchdog: twl4030_wdt: add missing of.h include

Quoted 6 lines · Dmitry Torokhov

The driver is using of_device_id and therefore needs to include of.h header. We used to get this definition indirectly via inclusion of matrix_keypad.h from twl.h, but we are cleaning up matrix_keypad.h from unnecessary includes.

Quoted 16 lines
---
  drivers/watchdog/twl4030_wdt.c | 1 +
  1 file changed, 1 insertion(+)
drivers/watchdog/twl4030_wdt.c +1 -0
index 355e428c0b99..e715ac1369a0 100644
@@ -9,6 +9,7 @@
  #include <linux/types.h>
  #include <linux/slab.h>
  #include <linux/kernel.h>
+#include <linux/of.h>
  #include <linux/watchdog.h>
  #include <linux/platform_device.h>
  #include <linux/mfd/twl.h>
#3 lore raw

Re: [PATCH 2/4] watchdog: twl4030_wdt: add missing of.h include

In reply to Dmitry Torokhov
Quoted 2 lines · Dmitry Torokhov

The driver is using of_device_id and therefore needs to include of.h header.

This is incorrect. For of_device_id the mod_devicetable.h should be used.

Quoted 3 lines

We used to get this definition indirectly via inclusion
of matrix_keypad.h from twl.h, but we are cleaning up matrix_keypad.h from unnecessary includes.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author maintainer
#4 lore raw

PATCH 3/4 mfd: twl4030-irq: add missing device.h include

In reply to Dmitry Torokhov

The driver is using "struct device" and therefore needs to include device.h header. We used to get this definition indirectly via inclusion of matrix_keypad.h from twl.h, but we are cleaning up matrix_keypad.h from unnecessary includes.

---
 drivers/mfd/twl4030-irq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/twl4030-irq.c +1 -0
index 4f576f0160a9..87496c1cb8bc 100644
@@ -14,6 +14,7 @@
  * by syed khasim <[email protected]>
  */
 
+#include <linux/device.h>
 #include <linux/export.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
Signature · 1 line
2.38.0.rc1.362.ged0d419d3c-goog
Reviewed-by on v1 3/4
#5 lore raw

Re: [PATCH 3/4] mfd: twl4030-irq: add missing device.h include

Quoted 4 lines · Dmitry Torokhov

The driver is using "struct device" and therefore needs to include device.h header. We used to get this definition indirectly via inclusion of matrix_keypad.h from twl.h, but we are cleaning up matrix_keypad.h from unnecessary includes.

Quoted 20 lines
---
 drivers/mfd/twl4030-irq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/twl4030-irq.c +1 -0
index 4f576f0160a9..87496c1cb8bc 100644
@@ -14,6 +14,7 @@
  * by syed khasim <[email protected]>
  */
 
+#include <linux/device.h>
 #include <linux/export.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
Signature · 1 line
2.38.0.rc1.362.ged0d419d3c-goog
Signature · 2 lines
With Best Regards,
Andy Shevchenko
author maintainer
#6 lore raw

PATCH 4/4 iio: adc: twl4030-madc: add missing of.h include

In reply to Dmitry Torokhov

The driver is using of_device_id and therefore needs to include of.h header. We used to get this definition indirectly via inclusion of matrix_keypad.h from twl.h, but we are cleaning up matrix_keypad.h from unnecessary includes.

---
 drivers/iio/adc/twl4030-madc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/adc/twl4030-madc.c +1 -0
index f8f8aea15612..c279c4f2c9b7 100644
@@ -30,6 +30,7 @@
 #include <linux/types.h>
 #include <linux/gfp.h>
 #include <linux/err.h>
+#include <linux/of.h>
 #include <linux/regulator/consumer.h>
 
 #include <linux/iio/iio.h>
Signature · 1 line
2.38.0.rc1.362.ged0d419d3c-goog
#7 lore raw

Re: [PATCH 4/4] iio: adc: twl4030-madc: add missing of.h include

Quoted 2 lines · Dmitry Torokhov

The driver is using of_device_id and therefore needs to include of.h header.

As per patch 2 comment, mod_devicetable.h is needed for that.

Quoted 3 lines

We used to get this definition indirectly via inclusion
of matrix_keypad.h from twl.h, but we are cleaning up matrix_keypad.h from unnecessary includes.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author maintainer
#8 lore raw

Re: [PATCH 4/4] iio: adc: twl4030-madc: add missing of.h include

Quoted 5 lines · Andy Shevchenko
Quoted 2 lines · Dmitry Torokhov

The driver is using of_device_id and therefore needs to include of.h header.

As per patch 2 comment, mod_devicetable.h is needed for that.

It also uses of_match_ptr(), so of.h is the one that is needed. I'll adjust the patch description.

Thanks.

Signature · 1 line
Dmitry
#9 lore raw

Re: [PATCH 4/4] iio: adc: twl4030-madc: add missing of.h include

Quoted 9 lines · Dmitry Torokhov
Quoted 5 lines · Andy Shevchenko
Quoted 2 lines · Dmitry Torokhov

The driver is using of_device_id and therefore needs to include of.h header.

As per patch 2 comment, mod_devicetable.h is needed for that.

It also uses of_match_ptr(), so of.h is the one that is needed. I'll adjust the patch description.

Thank you! In such case feel free to add my tag.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
Reviewed-by on v1 1/4
#10 lore raw
In reply to Dmitry Torokhov
Quoted 2 lines · Dmitry Torokhov

The driver is using of_match_ptr() and therefore needs to include of.h header.

Quoted 20 lines
---
 drivers/input/misc/twl4030-pwrbutton.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/misc/twl4030-pwrbutton.c +1 -0
index b307cca17022..e3ee0638ffba 100644
@@ -26,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/mfd/twl.h>
 
Signature · 1 line
2.38.0.rc1.362.ged0d419d3c-goog
Signature · 2 lines
With Best Regards,
Andy Shevchenko
Reviewed-by on v1 1/4
#11 lore raw
In reply to Dmitry Torokhov
Quoted 4 lines · Dmitry Torokhov

The driver is using of_match_ptr() and therefore needs to include of.h header.

Quoted 18 lines
---
 drivers/input/misc/twl4030-pwrbutton.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/misc/twl4030-pwrbutton.c +1 -0
index b307cca17022..e3ee0638ffba 100644
@@ -26,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/mfd/twl.h>
 
Signature · 1 line
2.38.0.rc1.362.ged0d419d3c-goog