Skip to contentSkip to conversation

w1: amd_axi_w1: Explicitly include correct DT includes

PATCH Applied Rob Herring 3 participants 3 messages Dec 7, 2023 – Dec 11, 2023

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

PATCH 1/1 w1: amd_axi_w1: 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 was 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/w1/masters/amd_axi_w1.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/w1/masters/amd_axi_w1.c +2 -1
index 24a05c2de5f1..4d3a68ca9263 100644
@@ -12,8 +12,9 @@
 #include <linux/io.h>
 #include <linux/jiffies.h>
 #include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of_platform.h>
+#include <linux/platform_device.h>
 #include <linux/types.h>
 #include <linux/wait.h>
 
Signature · 1 line
2.42.0
#1 lore raw
Quoted 10 lines · Rob Herring

The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was 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.

[...]

Applied, thanks!

[1/1] w1: amd_axi_w1: Explicitly include correct DT includes

      https://git.kernel.org/krzk/linux-w1/c/efc19c44aa442197ddcbb157c6ca54a56eba8c4e

Best regards,

Signature · 1 line
Krzysztof Kozlowski <[email protected]>
maintainer Tested-by
#2 lore raw
Quoted 5 lines · Krzysztof Kozlowski

Applied, thanks!

[1/1] w1: amd_axi_w1: Explicitly include correct DT includes

       https://git.kernel.org/krzk/linux-w1/c/efc19c44aa442197ddcbb157c6ca54a56eba8c4e

Thank you Rob and Krzysztof,

I've regression tested this on W1 dual instance hardware running on the AMD KR260 development board and it continues to function correctly. Small change, but tested nevertheless.