Linux Watchdog driver development
 help / color / mirror / Atom feed
* [PATCH] watchdog: s3c2410-wdt: Use of_match_ptr().
@ 2012-05-02 17:40 Wim Van Sebroeck
  0 siblings, 0 replies; 3+ messages in thread
From: Wim Van Sebroeck @ 2012-05-02 17:40 UTC (permalink / raw)
  To: Linux Watchdog Mailing List, Jaehoon Chung, MyungJoo Ham,
	Banajit Goswami, Ben Dooks, Ben Dooks, Wolfram Sang

Use of_match_ptr definition for the of_match_table.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

---

Can someone compile test this?

Thanks,
Wim.

diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index 04e5a6d..686c8fc 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -503,8 +503,6 @@ static const struct of_device_id s3c2410_wdt_match[] = {
 	{},
 };
 MODULE_DEVICE_TABLE(of, s3c2410_wdt_match);
-#else
-#define s3c2410_wdt_match NULL
 #endif
 
 static struct platform_driver s3c2410wdt_driver = {
@@ -516,7 +514,7 @@ static struct platform_driver s3c2410wdt_driver = {
 	.driver		= {
 		.owner	= THIS_MODULE,
 		.name	= "s3c2410-wdt",
-		.of_match_table	= s3c2410_wdt_match,
+		.of_match_table	= of_match_ptr(s3c2410_wdt_match),
 	},
 };
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: s3c2410-wdt: Use of_match_ptr().
@ 2012-05-03  1:00 MyungJoo Ham
  2012-05-03  4:48 ` Wim Van Sebroeck
  0 siblings, 1 reply; 3+ messages in thread
From: MyungJoo Ham @ 2012-05-03  1:00 UTC (permalink / raw)
  To: Wim Van Sebroeck, Linux Watchdog Mailing List,
	정재훈, BANAJIT GOSWAMI, Ben Dooks, Ben Dooks,
	Wolfram Sang


> Use of_match_ptr definition for the of_match_table.
> 
> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
> 
> ---
> 
> Can someone compile test this?
> 
> Thanks,
> Wim.


I get this error. You probably need to add #include.

scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      drivers/watchdog/watchdog_core.o
  CC      drivers/watchdog/watchdog_dev.o
  CC      drivers/watchdog/s3c2410_wdt.o
  LD      drivers/watchdog/watchdog.o
drivers/watchdog/s3c2410_wdt.c:517:3: error: implicit declaration of function ‘of_match_ptr’
drivers/watchdog/s3c2410_wdt.c:517:34: error: ‘s3c2410_wdt_match’ undeclared here (not in a function)
make[2]: *** [drivers/watchdog/s3c2410_wdt.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [drivers/watchdog] Error 2
make: *** [drivers] Error 2

> 
> diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
> index 04e5a6d..686c8fc 100644
> --- a/drivers/watchdog/s3c2410_wdt.c
> +++ b/drivers/watchdog/s3c2410_wdt.c
> @@ -503,8 +503,6 @@ static const struct of_device_id s3c2410_wdt_match[] = {
>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, s3c2410_wdt_match);
> -#else
> -#define s3c2410_wdt_match NULL
>  #endif
>  
>  static struct platform_driver s3c2410wdt_driver = {
> @@ -516,7 +514,7 @@ static struct platform_driver s3c2410wdt_driver = {
>  	.driver		= {
>  		.owner	= THIS_MODULE,
>  		.name	= "s3c2410-wdt",
> -		.of_match_table	= s3c2410_wdt_match,
> +		.of_match_table	= of_match_ptr(s3c2410_wdt_match),
>  	},
>  };
>  
> 
> 
> 
>        
>   
>          
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: s3c2410-wdt: Use of_match_ptr().
  2012-05-03  1:00 [PATCH] watchdog: s3c2410-wdt: Use of_match_ptr() MyungJoo Ham
@ 2012-05-03  4:48 ` Wim Van Sebroeck
  0 siblings, 0 replies; 3+ messages in thread
From: Wim Van Sebroeck @ 2012-05-03  4:48 UTC (permalink / raw)
  To: MyungJoo Ham
  Cc: Linux Watchdog Mailing List, 정재훈,
	BANAJIT GOSWAMI, Ben Dooks, Ben Dooks, Wolfram Sang

Hi,

> 
> > Use of_match_ptr definition for the of_match_table.
> > 
> > Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
> > 
> > ---
> > 
> > Can someone compile test this?
> > 
> > Thanks,
> > Wim.
> 
> 
> I get this error. You probably need to add #include.
> 
> scripts/kconfig/conf --silentoldconfig Kconfig
>   CHK     include/linux/version.h
>   CHK     include/generated/utsrelease.h
> make[1]: `include/generated/mach-types.h' is up to date.
>   CALL    scripts/checksyscalls.sh
>   CHK     include/generated/compile.h
>   CC      drivers/watchdog/watchdog_core.o
>   CC      drivers/watchdog/watchdog_dev.o
>   CC      drivers/watchdog/s3c2410_wdt.o
>   LD      drivers/watchdog/watchdog.o
> drivers/watchdog/s3c2410_wdt.c:517:3: error: implicit declaration of function ‘of_match_ptr’
> drivers/watchdog/s3c2410_wdt.c:517:34: error: ‘s3c2410_wdt_match’ undeclared here (not in a function)
> make[2]: *** [drivers/watchdog/s3c2410_wdt.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [drivers/watchdog] Error 2
> make: *** [drivers] Error 2

Can you try with: #include <linux/of.h> ?

Thanks,
Wim.

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-03  4:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03  1:00 [PATCH] watchdog: s3c2410-wdt: Use of_match_ptr() MyungJoo Ham
2012-05-03  4:48 ` Wim Van Sebroeck
  -- strict thread matches above, loose matches on Subject: below --
2012-05-02 17:40 Wim Van Sebroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox