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

of: Drop unnecessary includes in headers

Drop unnecessary includes in DT headers. Some simply aren't needed and
some can be replaced with forward declarations.

Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-5-581e2605fe47@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>

+7 -6
+2 -3
include/linux/of.h
··· 16 16 #include <linux/errno.h> 17 17 #include <linux/kobject.h> 18 18 #include <linux/mod_devicetable.h> 19 - #include <linux/topology.h> 20 - #include <linux/notifier.h> 21 19 #include <linux/property.h> 22 20 #include <linux/list.h> 23 21 24 22 #include <asm/byteorder.h> 25 - #include <asm/errno.h> 26 23 27 24 typedef u32 phandle; 28 25 typedef u32 ihandle; ··· 1517 1520 OF_RECONFIG_CHANGE_ADD, 1518 1521 OF_RECONFIG_CHANGE_REMOVE, 1519 1522 }; 1523 + 1524 + struct notifier_block; 1520 1525 1521 1526 #ifdef CONFIG_OF_DYNAMIC 1522 1527 extern int of_reconfig_notifier_register(struct notifier_block *);
+2 -1
include/linux/of_device.h
··· 7 7 #include <linux/of_platform.h> /* temporary until merge */ 8 8 9 9 #include <linux/of.h> 10 - #include <linux/mod_devicetable.h> 11 10 12 11 struct device; 12 + struct of_device_id; 13 + struct kobj_uevent_env; 13 14 14 15 #ifdef CONFIG_OF 15 16 extern const struct of_device_id *of_match_device(
+3 -2
include/linux/of_platform.h
··· 6 6 * <benh@kernel.crashing.org> 7 7 */ 8 8 9 - #include <linux/device.h> 10 9 #include <linux/mod_devicetable.h> 11 - #include <linux/pm.h> 12 10 #include <linux/of_device.h> 13 11 #include <linux/platform_device.h> 12 + 13 + struct device; 14 + struct of_device_id; 14 15 15 16 /** 16 17 * struct of_dev_auxdata - lookup table entry for device names & platform_data