diff mbox series

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

Message ID 20220927052217.2784593-2-dmitry.torokhov@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/4] Input: twl4030-pwrbutton - add missing of.h include | expand

Commit Message

Dmitry Torokhov Sept. 27, 2022, 5:22 a.m. UTC
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.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/watchdog/twl4030_wdt.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Guenter Roeck Sept. 27, 2022, 10:55 a.m. UTC | #1
On 9/26/22 22:22, Dmitry Torokhov wrote:
> 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.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/twl4030_wdt.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c
> index 355e428c0b99..e715ac1369a0 100644
> --- a/drivers/watchdog/twl4030_wdt.c
> +++ b/drivers/watchdog/twl4030_wdt.c
> @@ -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>
Andy Shevchenko Sept. 27, 2022, 12:23 p.m. UTC | #2
On Mon, Sep 26, 2022 at 10:22:14PM -0700, Dmitry Torokhov wrote:
> 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.

> 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.
diff mbox series

Patch

diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c
index 355e428c0b99..e715ac1369a0 100644
--- a/drivers/watchdog/twl4030_wdt.c
+++ b/drivers/watchdog/twl4030_wdt.c
@@ -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>