diff mbox series

hte: tegra: fix 'struct of_device_id' build error

Message ID 20221215164626.1209452-1-arnd@kernel.org
State Handled Elsewhere
Headers show
Series hte: tegra: fix 'struct of_device_id' build error | expand

Commit Message

Arnd Bergmann Dec. 15, 2022, 4:46 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/hte/hte-tegra194-test.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Dipen Patel Dec. 15, 2022, 11:30 p.m. UTC | #1
On 12/15/22 8:46 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/hte/hte-tegra194-test.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hte/hte-tegra194-test.c b/drivers/hte/hte-tegra194-test.c
> index 5d776a185bd6..ce8c44e79221 100644
> --- a/drivers/hte/hte-tegra194-test.c
> +++ b/drivers/hte/hte-tegra194-test.c
> @@ -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.

Acked-by: Dipen Patel <dipenp@nvidia.com>
diff mbox series

Patch

diff --git a/drivers/hte/hte-tegra194-test.c b/drivers/hte/hte-tegra194-test.c
index 5d776a185bd6..ce8c44e79221 100644
--- a/drivers/hte/hte-tegra194-test.c
+++ b/drivers/hte/hte-tegra194-test.c
@@ -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>