Skip to contentSkip to conversation

hte: tegra: fix 'struct of_device_id' build error

PATCH In review Arnd Bergmann 2 participants 2 messages Dec 15, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hte: tegra: fix 'struct of_device_id' build error

From: Arnd Bergmann <[email protected]>

Without the extra #include, this driver produces a build failure in some configurations.

drivers/hte/hte-tegra194-test.c:96:34: error: array type has incomplete element type 'struct of_device_id'
96 | static const struct of_device_id tegra_hte_test_of_match[] = {

Fixes 9a75a7cd03c9 ("hte: Add Tegra HTE test driver")
---
 drivers/hte/hte-tegra194-test.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hte/hte-tegra194-test.c +1 -0
index 5d776a185bd6..ce8c44e79221 100644
@@ -6,6 +6,7 @@
  */
 
 #include <linux/err.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/interrupt.h>
Signature · 1 line
2.35.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 19 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Without the extra #include, this driver produces a build failure in some configurations.

drivers/hte/hte-tegra194-test.c:96:34: error: array type has incomplete element type 'struct of_device_id'
96 | static const struct of_device_id tegra_hte_test_of_match[] = {

Fixes 9a75a7cd03c9 ("hte: Add Tegra HTE test driver")
---
 drivers/hte/hte-tegra194-test.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hte/hte-tegra194-test.c +0 -0
index 5d776a185bd6..ce8c44e79221 100644

drivers/hte/hte-tegra194-test.c line 12

Quoted 7 lines
drivers/hte/hte-tegra194-test.c +1 -0
@@ -6,6 +6,7 @@
  */
 
 #include <linux/err.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/interrupt.h>

I will push this change from HTE tree. Thanks.