diff mbox series

watchdog: mt7621: Fix compiler error, missing include

Message ID 20190114211719.11461-1-opensource@vdorst.com (mailing list archive)
State New, archived
Headers show
Series watchdog: mt7621: Fix compiler error, missing include | expand

Commit Message

René van Dorst Jan. 14, 2019, 9:17 p.m. UTC
drivers/watchdog/mt7621_wdt.c:174:34: error: array type has incomplete element type 'struct of_device_id'
 static const struct of_device_id mt7621_wdt_match[] = {
                                  ^~~~~~~~~~~~~~~~
drivers/watchdog/mt7621_wdt.c:175:4: error: field name not in record or union initializer
  { .compatible = "mediatek,mt7621-wdt" },
    ^
drivers/watchdog/mt7621_wdt.c:175:4: note: (near initialization for 'mt7621_wdt_match')
drivers/watchdog/mt7621_wdt.c:174:34: warning: 'mt7621_wdt_match' defined but not used [-Wunused-variable]
 static const struct of_device_id mt7621_wdt_match[] = {
                                  ^~~~~~~~~~~~~~~~

Signed-off-by: René van Dorst <opensource@vdorst.com>
---
 drivers/watchdog/mt7621_wdt.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Matthias Brugger Jan. 15, 2019, 3:16 p.m. UTC | #1
On 14/01/2019 22:17, René van Dorst wrote:
> drivers/watchdog/mt7621_wdt.c:174:34: error: array type has incomplete element type 'struct of_device_id'
>  static const struct of_device_id mt7621_wdt_match[] = {
>                                   ^~~~~~~~~~~~~~~~
> drivers/watchdog/mt7621_wdt.c:175:4: error: field name not in record or union initializer
>   { .compatible = "mediatek,mt7621-wdt" },
>     ^
> drivers/watchdog/mt7621_wdt.c:175:4: note: (near initialization for 'mt7621_wdt_match')
> drivers/watchdog/mt7621_wdt.c:174:34: warning: 'mt7621_wdt_match' defined but not used [-Wunused-variable]
>  static const struct of_device_id mt7621_wdt_match[] = {
>                                   ^~~~~~~~~~~~~~~~
> 

Did this work in the past?
I suppose so. Could you provide a fixes tag for stable.

Thanks,
Matthias

> Signed-off-by: René van Dorst <opensource@vdorst.com>
> ---
>  drivers/watchdog/mt7621_wdt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
> index 5c4a764717c4..a3be7db9d76f 100644
> --- a/drivers/watchdog/mt7621_wdt.c
> +++ b/drivers/watchdog/mt7621_wdt.c
> @@ -16,6 +16,7 @@
>  #include <linux/kernel.h>
>  #include <linux/watchdog.h>
>  #include <linux/moduleparam.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  
>  #include <asm/mach-ralink/ralink_regs.h>
>
René van Dorst Jan. 15, 2019, 3:29 p.m. UTC | #2
Quoting Matthias Brugger <matthias.bgg@gmail.com>:

> On 14/01/2019 22:17, René van Dorst wrote:
>> drivers/watchdog/mt7621_wdt.c:174:34: error: array type has  
>> incomplete element type 'struct of_device_id'
>>  static const struct of_device_id mt7621_wdt_match[] = {
>>                                   ^~~~~~~~~~~~~~~~
>> drivers/watchdog/mt7621_wdt.c:175:4: error: field name not in  
>> record or union initializer
>>   { .compatible = "mediatek,mt7621-wdt" },
>>     ^
>> drivers/watchdog/mt7621_wdt.c:175:4: note: (near initialization for  
>> 'mt7621_wdt_match')
>> drivers/watchdog/mt7621_wdt.c:174:34: warning: 'mt7621_wdt_match'  
>> defined but not used [-Wunused-variable]
>>  static const struct of_device_id mt7621_wdt_match[] = {
>>                                   ^~~~~~~~~~~~~~~~
>>
>
> Did this work in the past?
> I suppose so. Could you provide a fixes tag for stable.

I see that I am not the first who spotted this.  
https://patchwork.kernel.org/patch/10745049/

So better drop this one.

Greats,

René


> Thanks,
> Matthias
>
>> Signed-off-by: René van Dorst <opensource@vdorst.com>
>> ---
>>  drivers/watchdog/mt7621_wdt.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
>> index 5c4a764717c4..a3be7db9d76f 100644
>> --- a/drivers/watchdog/mt7621_wdt.c
>> +++ b/drivers/watchdog/mt7621_wdt.c
>> @@ -16,6 +16,7 @@
>>  #include <linux/kernel.h>
>>  #include <linux/watchdog.h>
>>  #include <linux/moduleparam.h>
>> +#include <linux/of.h>
>>  #include <linux/platform_device.h>
>>
>>  #include <asm/mach-ralink/ralink_regs.h>
>>
diff mbox series

Patch

diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
index 5c4a764717c4..a3be7db9d76f 100644
--- a/drivers/watchdog/mt7621_wdt.c
+++ b/drivers/watchdog/mt7621_wdt.c
@@ -16,6 +16,7 @@ 
 #include <linux/kernel.h>
 #include <linux/watchdog.h>
 #include <linux/moduleparam.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 
 #include <asm/mach-ralink/ralink_regs.h>