Skip to content

Commit ddb8172

Browse files
andy-shevWim Van Sebroeck
authored andcommitted
watchdog: Don't use "proxy" headers
Update header inclusions to follow IWYU (Include What You Use) principle. Note that kernel.h is discouraged to be included as it's written at the top of that file. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 6a4a2d5 commit ddb8172

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

drivers/watchdog/watchdog_core.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,14 @@
2424
* This material is provided "AS-IS" and at no charge.
2525
*/
2626

27-
#include <linux/hrtimer.h>
27+
#include <linux/cdev.h>
28+
#include <linux/device.h>
29+
#include <linux/hrtimer_types.h>
30+
#include <linux/init.h>
2831
#include <linux/kthread.h>
32+
#include <linux/mutex_types.h>
33+
#include <linux/types.h>
34+
#include <linux/watchdog.h>
2935

3036
#define MAX_DOGS 32 /* Maximum number of watchdog devices */
3137

drivers/watchdog/watchdog_pretimeout.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#include <linux/slab.h>
88
#include <linux/spinlock.h>
99
#include <linux/string.h>
10+
#include <linux/sysfs.h>
11+
#include <linux/types.h>
1012
#include <linux/watchdog.h>
1113

1214
#include "watchdog_core.h"

include/linux/watchdog.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@
99
#ifndef _LINUX_WATCHDOG_H
1010
#define _LINUX_WATCHDOG_H
1111

12-
1312
#include <linux/bitops.h>
14-
#include <linux/cdev.h>
15-
#include <linux/device.h>
16-
#include <linux/kernel.h>
13+
#include <linux/limits.h>
1714
#include <linux/notifier.h>
15+
#include <linux/printk.h>
16+
#include <linux/types.h>
17+
1818
#include <uapi/linux/watchdog.h>
1919

20+
struct attribute_group;
21+
struct device;
22+
struct module;
23+
2024
struct watchdog_ops;
2125
struct watchdog_device;
2226
struct watchdog_core_data;

0 commit comments

Comments
 (0)