Skip to contentSkip to conversation

soc: apple: mailbox: Add explicit include of platform_device.h

PATCH RESEND In review Rob Herring 3 participants 3 messages Oct 30, 2023 – Nov 23, 2023 Arm/Apple machine support

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 soc: apple: mailbox: Add explicit include of platform_device.h

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 and pull in various other headers. In preparation to fix this, adjust the includes for what is actually needed.

platform_device.h is implicitly included by of_platform.h, but that's going to be removed.

---
Note this was added in the merge window and missed the last round.

Arnd, Can you apply this directly.

---
 drivers/soc/apple/mailbox.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/apple/mailbox.c +1 -0
index 0cbd172f435e..780199bf351e 100644
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/spinlock.h>
 #include <linux/types.h>
Signature · 1 line
2.42.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 33 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 and pull in various other headers. In preparation to fix this, adjust the includes for what is actually needed.

platform_device.h is implicitly included by of_platform.h, but that's going to be removed.

---
Note this was added in the merge window and missed the last round.

Arnd, Can you apply this directly.

---
 drivers/soc/apple/mailbox.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/apple/mailbox.c +1 -1
index 0cbd172f435e..780199bf351e 100644
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/spinlock.h>
 #include <linux/types.h>
--
Quoted 3 lines

2.42.0

Pretty obvious patch.

Signature · 1 line
真実はいつも一つ!/ Always, there's only one truth!
#2 lore raw
In reply to Rob Herring
Quoted 6 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 and pull in various other headers. In preparation to fix this, adjust the includes for what is actually needed.

Quoted 8 lines

platform_device.h is implicitly included by of_platform.h, but that's going to be removed.

---
Note this was added in the merge window and missed the last round.

Arnd, Can you apply this directly.

Just noticed this but I'm confused. I never sent Arnd the pull for this, so it's not upstream nor on the way yet. I've applied it to asahi-soc/mailbox though. Thanks for reminding me, I'll send the pull now :)

- Hector