Skip to contentSkip to conversation

gpu/host1x: Explicitly include correct DT includes

PATCH Applied Rob Herring 2 participants 2 messages Jul 14, 2023 – Jul 21, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpu/host1x: Explicitly include correct DT includes

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.

---
 drivers/gpu/host1x/context.c | 2 +-
 drivers/gpu/host1x/dev.c     | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/host1x/context.c +1 -1
index 9ad89d22c0ca..c000d4e0c2c6 100644
@@ -6,7 +6,7 @@
 #include <linux/device.h>
 #include <linux/kref.h>
 #include <linux/of.h>
-#include <linux/of_platform.h>
+#include <linux/of_device.h>
 #include <linux/pid.h>
 #include <linux/slab.h>
 
drivers/gpu/host1x/dev.c +2 -1
index aae2efeef503..7c6699aed7d2 100644
@@ -11,8 +11,9 @@
 #include <linux/io.h>
 #include <linux/list.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
 #include <linux/of.h>
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/slab.h>
 
Signature · 1 line
2.40.1
#1 lore raw
Quoted 9 lines · Rob Herring

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.

Quoted 5 lines
---
 drivers/gpu/host1x/context.c | 2 +-
 drivers/gpu/host1x/dev.c     | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Applied to drm-misc, thanks.

Thierry