Skip to content

Commit

Permalink
mailbox: Explicitly include correct DT includes
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
  • Loading branch information
Rob Herring authored and Jassi Brar committed Sep 5, 2023
1 parent 4aac24c commit e9803aa
Show file tree
Hide file tree
Showing 16 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions drivers/mailbox/arm_mhu.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/io.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of.h>

#define INTR_STAT_OFS 0x0
#define INTR_SET_OFS 0x8
Expand Down
1 change: 0 additions & 1 deletion drivers/mailbox/arm_mhu_db.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>

#define INTR_STAT_OFS 0x0
#define INTR_SET_OFS 0x8
Expand Down
1 change: 1 addition & 0 deletions drivers/mailbox/hi3660-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/iopoll.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

Expand Down
1 change: 1 addition & 0 deletions drivers/mailbox/hi6220-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/kfifo.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

Expand Down
3 changes: 2 additions & 1 deletion drivers/mailbox/imx-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
#include <linux/kernel.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/suspend.h>
#include <linux/slab.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/mailbox/mailbox-mpfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/mailbox_controller.h>
#include <soc/microchip/mpfs.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/mailbox/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/bitops.h>
#include <linux/mailbox_client.h>
#include <linux/mailbox_controller.h>
#include <linux/of.h>

#include "mailbox.h"

Expand Down
3 changes: 2 additions & 1 deletion drivers/mailbox/mtk-adsp-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include <linux/kernel.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

struct mtk_adsp_mbox_priv {
Expand Down
2 changes: 1 addition & 1 deletion drivers/mailbox/mtk-cmdq-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <linux/platform_device.h>
#include <linux/mailbox_controller.h>
#include <linux/mailbox/mtk-cmdq-mailbox.h>
#include <linux/of_device.h>
#include <linux/of.h>

#define CMDQ_OP_CODE_MASK (0xff << CMDQ_OP_CODE_SHIFT)
#define CMDQ_NUM_CMD(t) (t->cmd_buf_size / CMDQ_INST_SIZE)
Expand Down
2 changes: 1 addition & 1 deletion drivers/mailbox/omap-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/kfifo.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/omap-mailbox.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/mailbox/platform_mhu.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/mailbox_controller.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/mailbox/rockchip-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/mailbox_controller.h>
#include <linux/of.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>

#define MAILBOX_A2B_INTEN 0x00
Expand Down
2 changes: 1 addition & 1 deletion drivers/mailbox/sprd-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <linux/io.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/clk.h>

Expand Down
1 change: 1 addition & 0 deletions drivers/mailbox/stm32-ipcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/io.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_wakeirq.h>

Expand Down
1 change: 0 additions & 1 deletion drivers/mailbox/tegra-hsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <linux/io.h>
#include <linux/mailbox_controller.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/slab.h>
Expand Down
2 changes: 0 additions & 2 deletions drivers/mailbox/zynqmp-ipi-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>

/* IPI agent ID any */
Expand Down

0 comments on commit e9803aa

Please sign in to comment.