2022-12-15 17:51:15

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH] 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")
Signed-off-by: Arnd Bergmann <[email protected]>
---
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>
--
2.35.1


2022-12-16 01:04:07

by Dipen Patel

[permalink] [raw]
Subject: Re: [PATCH] hte: tegra: fix 'struct of_device_id' build error

On 12/15/22 8:46 AM, Arnd Bergmann wrote:
> 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")
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> 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 <[email protected]>