misc: Explicitly include correct DT includes
Subsystems (8)
PATCH 1/1 misc: 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/misc/cxl/base.c | 1 + drivers/misc/fastrpc.c | 1 + drivers/misc/lis3lv02d/lis3lv02d.c | 2 +- drivers/misc/qcom-coincell.c | 1 - drivers/misc/sram.c | 2 +- drivers/misc/vcpu_stall_detector.c | 1 - drivers/misc/xilinx_sdfec.c | 4 +++- drivers/misc/xilinx_tmr_inject.c | 3 ++- drivers/misc/xilinx_tmr_manager.c | 3 ++- 9 files changed, 11 insertions(+), 7 deletions(-)
drivers/misc/cxl/base.c +1 -0
@@ -7,6 +7,7 @@#include <linux/rcupdate.h> #include <asm/errno.h> #include <misc/cxl-base.h> +#include <linux/of.h> #include <linux/of_platform.h> #include "cxl.h"
drivers/misc/fastrpc.c +1 -0
@@ -13,6 +13,7 @@#include <linux/module.h> #include <linux/of_address.h> #include <linux/of.h> +#include <linux/platform_device.h> #include <linux/sort.h> #include <linux/of_platform.h> #include <linux/rpmsg.h>
drivers/misc/lis3lv02d/lis3lv02d.c +1 -1
@@ -26,7 +26,7 @@#include <linux/miscdevice.h> #include <linux/pm_runtime.h> #include <linux/atomic.h> -#include <linux/of_device.h> +#include <linux/of.h> #include "lis3lv02d.h" #define DRIVER_NAME "lis3lv02d"
drivers/misc/qcom-coincell.c +0 -1
@@ -8,7 +8,6 @@#include <linux/slab.h> #include <linux/of.h> #include <linux/regmap.h> -#include <linux/of_device.h> #include <linux/platform_device.h> struct qcom_coincell {
drivers/misc/sram.c +1 -1
@@ -10,8 +10,8 @@#include <linux/genalloc.h> #include <linux/io.h> #include <linux/list_sort.h> +#include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/slab.h>
drivers/misc/vcpu_stall_detector.c +0 -1
@@ -13,7 +13,6 @@#include <linux/module.h> #include <linux/nmi.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/param.h> #include <linux/percpu.h> #include <linux/platform_device.h>
drivers/misc/xilinx_sdfec.c +3 -1
@@ -15,12 +15,14 @@#include <linux/interrupt.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/of_platform.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <linux/poll.h> #include <linux/slab.h> #include <linux/clk.h> #include <linux/compat.h> #include <linux/highmem.h> +#include <linux/of.h> #include <uapi/misc/xilinx_sdfec.h>
drivers/misc/xilinx_tmr_inject.c +2 -1
@@ -11,7 +11,8 @@#include <asm/xilinx_mb_manager.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <linux/fault-inject.h> /* TMR Inject Register offsets */
drivers/misc/xilinx_tmr_manager.c +2 -1
@@ -15,7 +15,8 @@#include <asm/xilinx_mb_manager.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> /* TMR Manager Register offsets */ #define XTMR_MANAGER_CR_OFFSET 0x0
Signature · 1 line
2.40.1
Quoted 12 lines · Rob Herring
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore 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 includeplatform_device.handof.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 1 line
Signed-off-by Rob Herring <[email protected]>
Signature · 7 lines
Andrew Donnellan OzLabs, ADL Canberra [email protected] IBM Australia Limited _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 105 lines · Rob Herring
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore 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 includeplatform_device.handof.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 <[email protected]>--- drivers/misc/cxl/base.c | 1 + drivers/misc/fastrpc.c | 1 + drivers/misc/lis3lv02d/lis3lv02d.c | 2 +- drivers/misc/qcom-coincell.c | 1 - drivers/misc/sram.c | 2 +- drivers/misc/vcpu_stall_detector.c | 1 - drivers/misc/xilinx_sdfec.c | 4 +++- drivers/misc/xilinx_tmr_inject.c | 3 ++- drivers/misc/xilinx_tmr_manager.c | 3 ++- 9 files changed, 11 insertions(+), 7 deletions(-)drivers/misc/cxl/base.c +1
-0@@ -7,6 +7,7 @@#include <linux/rcupdate.h> #include <asm/errno.h> #include <misc/cxl-base.h> +#include <linux/of.h> #include <linux/of_platform.h> #include "cxl.h" drivers/misc/fastrpc.c +1
-0@@ -13,6 +13,7 @@#include <linux/module.h> #include <linux/of_address.h> #include <linux/of.h> +#include <linux/platform_device.h> #include <linux/sort.h> #include <linux/of_platform.h> #include <linux/rpmsg.h> drivers/misc/lis3lv02d/lis3lv02d.c +1
-1@@ -26,7 +26,7 @@#include <linux/miscdevice.h> #include <linux/pm_runtime.h> #include <linux/atomic.h> -#include <linux/of_device.h> +#include <linux/of.h> #include "lis3lv02d.h" #define DRIVER_NAME "lis3lv02d"drivers/misc/qcom-coincell.c +0
-1@@ -8,7 +8,6 @@#include <linux/slab.h> #include <linux/of.h> #include <linux/regmap.h> -#include <linux/of_device.h> #include <linux/platform_device.h> struct qcom_coincell {drivers/misc/sram.c +1
-1@@ -10,8 +10,8 @@#include <linux/genalloc.h> #include <linux/io.h> #include <linux/list_sort.h> +#include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/slab.h> drivers/misc/vcpu_stall_detector.c +0
-1@@ -13,7 +13,6 @@#include <linux/module.h> #include <linux/nmi.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/param.h> #include <linux/percpu.h> #include <linux/platform_device.h> drivers/misc/xilinx_sdfec.c +0
-0@@ -15,12 +15,14 @@#include <linux/interrupt.h> #include <linux/kernel.h>
drivers/misc/xilinx_sdfec.c line 25
Quoted 10 lines
drivers/misc/xilinx_sdfec.c +3
-1#include <linux/module.h> -#include <linux/of_platform.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <linux/poll.h> #include <linux/slab.h> #include <linux/clk.h> #include <linux/compat.h> #include <linux/highmem.h> +#include <linux/of.h>
Double include of of.h. v2 coming.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel