Skip to content

Commit 8402083

Browse files
robherringyilunxu1984
authored andcommitted
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>
1 parent dbe5038 commit 8402083

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

drivers/fpga/altera-fpga2sdram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <linux/kernel.h>
2828
#include <linux/mfd/syscon.h>
2929
#include <linux/module.h>
30-
#include <linux/of_platform.h>
30+
#include <linux/of.h>
3131
#include <linux/regmap.h>
3232

3333
#define ALT_SDR_CTL_FPGAPORTRST_OFST 0x80

drivers/fpga/altera-freeze-bridge.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
#include <linux/delay.h>
88
#include <linux/io.h>
99
#include <linux/kernel.h>
10-
#include <linux/of_device.h>
10+
#include <linux/mod_devicetable.h>
1111
#include <linux/module.h>
12+
#include <linux/platform_device.h>
1213
#include <linux/fpga/fpga-bridge.h>
1314

1415
#define FREEZE_CSR_STATUS_OFFSET 0
@@ -198,13 +199,11 @@ static const struct fpga_bridge_ops altera_freeze_br_br_ops = {
198199
.enable_show = altera_freeze_br_enable_show,
199200
};
200201

201-
#ifdef CONFIG_OF
202202
static const struct of_device_id altera_freeze_br_of_match[] = {
203203
{ .compatible = "altr,freeze-bridge-controller", },
204204
{},
205205
};
206206
MODULE_DEVICE_TABLE(of, altera_freeze_br_of_match);
207-
#endif
208207

209208
static int altera_freeze_br_probe(struct platform_device *pdev)
210209
{
@@ -268,7 +267,7 @@ static struct platform_driver altera_freeze_br_driver = {
268267
.remove = altera_freeze_br_remove,
269268
.driver = {
270269
.name = "altera_freeze_br",
271-
.of_match_table = of_match_ptr(altera_freeze_br_of_match),
270+
.of_match_table = altera_freeze_br_of_match,
272271
},
273272
};
274273

drivers/fpga/altera-pr-ip-core-plat.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
*/
1010
#include <linux/fpga/altera-pr-ip-core.h>
1111
#include <linux/module.h>
12-
#include <linux/of_device.h>
12+
#include <linux/mod_devicetable.h>
13+
#include <linux/platform_device.h>
1314

1415
static int alt_pr_platform_probe(struct platform_device *pdev)
1516
{

drivers/fpga/microchip-spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <linux/fpga/fpga-mgr.h>
99
#include <linux/iopoll.h>
1010
#include <linux/module.h>
11-
#include <linux/of_device.h>
11+
#include <linux/of.h>
1212
#include <linux/spi/spi.h>
1313

1414
#define MPF_SPI_ISC_ENABLE 0x0B

drivers/fpga/of-fpga-region.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
#include <linux/kernel.h>
1313
#include <linux/list.h>
1414
#include <linux/module.h>
15+
#include <linux/of.h>
1516
#include <linux/of_platform.h>
17+
#include <linux/platform_device.h>
1618
#include <linux/slab.h>
1719
#include <linux/spinlock.h>
1820

drivers/fpga/stratix10-soc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/module.h>
1111
#include <linux/of.h>
1212
#include <linux/of_platform.h>
13+
#include <linux/platform_device.h>
1314

1415
/*
1516
* FPGA programming requires a higher level of privilege (EL3), per the SoC

0 commit comments

Comments
 (0)