Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fpga: 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.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20230714174449.4055156-1-robh@kernel.org
Signed-off-by: Xu Yilun <yilun.xu@intel.com>

authored by

Rob Herring and committed by
Xu Yilun
84020839 dbe5038a

+10 -7
+1 -1
drivers/fpga/altera-fpga2sdram.c
··· 27 27 #include <linux/kernel.h> 28 28 #include <linux/mfd/syscon.h> 29 29 #include <linux/module.h> 30 - #include <linux/of_platform.h> 30 + #include <linux/of.h> 31 31 #include <linux/regmap.h> 32 32 33 33 #define ALT_SDR_CTL_FPGAPORTRST_OFST 0x80
+3 -4
drivers/fpga/altera-freeze-bridge.c
··· 7 7 #include <linux/delay.h> 8 8 #include <linux/io.h> 9 9 #include <linux/kernel.h> 10 - #include <linux/of_device.h> 10 + #include <linux/mod_devicetable.h> 11 11 #include <linux/module.h> 12 + #include <linux/platform_device.h> 12 13 #include <linux/fpga/fpga-bridge.h> 13 14 14 15 #define FREEZE_CSR_STATUS_OFFSET 0 ··· 199 198 .enable_show = altera_freeze_br_enable_show, 200 199 }; 201 200 202 - #ifdef CONFIG_OF 203 201 static const struct of_device_id altera_freeze_br_of_match[] = { 204 202 { .compatible = "altr,freeze-bridge-controller", }, 205 203 {}, 206 204 }; 207 205 MODULE_DEVICE_TABLE(of, altera_freeze_br_of_match); 208 - #endif 209 206 210 207 static int altera_freeze_br_probe(struct platform_device *pdev) 211 208 { ··· 267 268 .remove = altera_freeze_br_remove, 268 269 .driver = { 269 270 .name = "altera_freeze_br", 270 - .of_match_table = of_match_ptr(altera_freeze_br_of_match), 271 + .of_match_table = altera_freeze_br_of_match, 271 272 }, 272 273 }; 273 274
+2 -1
drivers/fpga/altera-pr-ip-core-plat.c
··· 9 9 */ 10 10 #include <linux/fpga/altera-pr-ip-core.h> 11 11 #include <linux/module.h> 12 - #include <linux/of_device.h> 12 + #include <linux/mod_devicetable.h> 13 + #include <linux/platform_device.h> 13 14 14 15 static int alt_pr_platform_probe(struct platform_device *pdev) 15 16 {
+1 -1
drivers/fpga/microchip-spi.c
··· 8 8 #include <linux/fpga/fpga-mgr.h> 9 9 #include <linux/iopoll.h> 10 10 #include <linux/module.h> 11 - #include <linux/of_device.h> 11 + #include <linux/of.h> 12 12 #include <linux/spi/spi.h> 13 13 14 14 #define MPF_SPI_ISC_ENABLE 0x0B
+2
drivers/fpga/of-fpga-region.c
··· 12 12 #include <linux/kernel.h> 13 13 #include <linux/list.h> 14 14 #include <linux/module.h> 15 + #include <linux/of.h> 15 16 #include <linux/of_platform.h> 17 + #include <linux/platform_device.h> 16 18 #include <linux/slab.h> 17 19 #include <linux/spinlock.h> 18 20
+1
drivers/fpga/stratix10-soc.c
··· 10 10 #include <linux/module.h> 11 11 #include <linux/of.h> 12 12 #include <linux/of_platform.h> 13 + #include <linux/platform_device.h> 13 14 14 15 /* 15 16 * FPGA programming requires a higher level of privilege (EL3), per the SoC