[RESEND] soc: apple: mailbox: Add explicit include of platform_device.h

Message ID 20231030142620.818663-2-robh@kernel.org
State New
Headers
Series [RESEND] soc: apple: mailbox: Add explicit include of platform_device.h |

Commit Message

Rob Herring Oct. 30, 2023, 2:26 p.m. UTC
  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.

Signed-off-by: Rob Herring <robh@kernel.org>
---
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(+)
  

Comments

Neal Gompa Oct. 31, 2023, midnight UTC | #1
On Mon, Oct 30, 2023 at 10:27 AM Rob Herring <robh@kernel.org> wrote:
>
> 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.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> 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(+)
>
> diff --git a/drivers/soc/apple/mailbox.c b/drivers/soc/apple/mailbox.c
> index 0cbd172f435e..780199bf351e 100644
> --- a/drivers/soc/apple/mailbox.c
> +++ b/drivers/soc/apple/mailbox.c
> @@ -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>
> --
> 2.42.0
>
>

Pretty obvious patch.

Reviewed-by: Neal Gompa <neal@gompa.dev>
  
Hector Martin Nov. 23, 2023, 10:20 a.m. UTC | #2
On 2023/10/30 23:26, Rob Herring wrote:
> 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.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> 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
  

Patch

diff --git a/drivers/soc/apple/mailbox.c b/drivers/soc/apple/mailbox.c
index 0cbd172f435e..780199bf351e 100644
--- a/drivers/soc/apple/mailbox.c
+++ b/drivers/soc/apple/mailbox.c
@@ -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>