platform: Explicitly include correct DT includes
authorRob Herring <robh@kernel.org>
Fri, 14 Jul 2023 17:49:09 +0000 (11:49 -0600)
committerHans de Goede <hdegoede@redhat.com>
Wed, 26 Jul 2023 08:58:36 +0000 (10:58 +0200)
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20230714174909.4062739-1-robh@kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/chrome/cros_ec.c
drivers/platform/mellanox/mlxreg-hotplug.c
drivers/platform/mellanox/mlxreg-io.c

index 8b7949220382569dc2f3c6ef9fc77917014f1dcf..5d36fbc75e1bbbb0c4495d2229c9548d49d4fa62 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/of_platform.h>
+#include <linux/platform_device.h>
 #include <linux/platform_data/cros_ec_commands.h>
 #include <linux/platform_data/cros_ec_proto.h>
 #include <linux/slab.h>
index b7dcc64cd2386650d2b599ad25382f16b59e6677..6ddfea0d4c5bb3923c47949e1f779c964cc7ec05 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
 #include <linux/platform_data/mlxreg.h>
 #include <linux/platform_device.h>
 #include <linux/spinlock.h>
index ddc08abf398c631eb1dd77f2749cbfdc8e2fc7fd..83ba037408cdf67ee05f00a3be658b3f10644003 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/hwmon.h>
 #include <linux/hwmon-sysfs.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
 #include <linux/platform_data/mlxreg.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>