Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <andriy.shevchenko@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20250708133646.70384-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Andy Shevchenko and committed by
Wim Van Sebroeck
ddb8172c 6a4a2d5c

+17 -5
+7 -1
drivers/watchdog/watchdog_core.h
··· 24 24 * This material is provided "AS-IS" and at no charge. 25 25 */ 26 26 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> 28 31 #include <linux/kthread.h> 32 + #include <linux/mutex_types.h> 33 + #include <linux/types.h> 34 + #include <linux/watchdog.h> 29 35 30 36 #define MAX_DOGS 32 /* Maximum number of watchdog devices */ 31 37
+2
drivers/watchdog/watchdog_pretimeout.c
··· 7 7 #include <linux/slab.h> 8 8 #include <linux/spinlock.h> 9 9 #include <linux/string.h> 10 + #include <linux/sysfs.h> 11 + #include <linux/types.h> 10 12 #include <linux/watchdog.h> 11 13 12 14 #include "watchdog_core.h"
+8 -4
include/linux/watchdog.h
··· 9 9 #ifndef _LINUX_WATCHDOG_H 10 10 #define _LINUX_WATCHDOG_H 11 11 12 - 13 12 #include <linux/bitops.h> 14 - #include <linux/cdev.h> 15 - #include <linux/device.h> 16 - #include <linux/kernel.h> 13 + #include <linux/limits.h> 17 14 #include <linux/notifier.h> 15 + #include <linux/printk.h> 16 + #include <linux/types.h> 17 + 18 18 #include <uapi/linux/watchdog.h> 19 + 20 + struct attribute_group; 21 + struct device; 22 + struct module; 19 23 20 24 struct watchdog_ops; 21 25 struct watchdog_device;