of: Drop unnecessary includes in headers
authorRob Herring <robh@kernel.org>
Wed, 29 Mar 2023 15:52:02 +0000 (10:52 -0500)
committerRob Herring <robh@kernel.org>
Thu, 13 Apr 2023 22:46:34 +0000 (17:46 -0500)
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>
include/linux/of.h
include/linux/of_device.h
include/linux/of_platform.h

index ad361453705462ddb5587b63ca943d809cbf1f3a..bc2eb39dcf75325f06a714a9dcba4e69c4f0a186 100644 (file)
 #include <linux/errno.h>
 #include <linux/kobject.h>
 #include <linux/mod_devicetable.h>
-#include <linux/topology.h>
-#include <linux/notifier.h>
 #include <linux/property.h>
 #include <linux/list.h>
 
 #include <asm/byteorder.h>
-#include <asm/errno.h>
 
 typedef u32 phandle;
 typedef u32 ihandle;
@@ -1521,6 +1518,8 @@ enum of_reconfig_change {
        OF_RECONFIG_CHANGE_REMOVE,
 };
 
+struct notifier_block;
+
 #ifdef CONFIG_OF_DYNAMIC
 extern int of_reconfig_notifier_register(struct notifier_block *);
 extern int of_reconfig_notifier_unregister(struct notifier_block *);
index fbe342fb729ffdbe7359da7b43802787663c8ded..bafe50150d24eb00c9cab9ef6c00518db4a7cf16 100644 (file)
@@ -7,9 +7,10 @@
 #include <linux/of_platform.h> /* temporary until merge */
 
 #include <linux/of.h>
-#include <linux/mod_devicetable.h>
 
 struct device;
+struct of_device_id;
+struct kobj_uevent_env;
 
 #ifdef CONFIG_OF
 extern const struct of_device_id *of_match_device(
index 8ac5cb933dc3c529cb2e9b679a4160e679fb165c..d8045bcfc35edecc357f64bd63260ded42e22b5a 100644 (file)
@@ -6,12 +6,13 @@
  *                      <benh@kernel.crashing.org>
  */
 
-#include <linux/device.h>
 #include <linux/mod_devicetable.h>
-#include <linux/pm.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
 
+struct device;
+struct of_device_id;
+
 /**
  * struct of_dev_auxdata - lookup table entry for device names & platform_data
  * @compatible: compatible value of node to match against node