linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: spi-altera: Use of_match_ptr
@ 2012-08-15  7:30 Tobias Klauser
       [not found] ` <1345015828-8444-1-git-send-email-tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Klauser @ 2012-08-15  7:30 UTC (permalink / raw)
  To: Grant Likely, spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring

Instead of having to define the match table to NULL if CONFIG_OF isn't
set, use the of_match_ptr() macro which will do this for us.

Signed-off-by: Tobias Klauser <tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
---
 drivers/spi/spi-altera.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
index c00d00e..f1fec2a 100644
--- a/drivers/spi/spi-altera.c
+++ b/drivers/spi/spi-altera.c
@@ -307,8 +307,6 @@ static const struct of_device_id altera_spi_match[] = {
 	{},
 };
 MODULE_DEVICE_TABLE(of, altera_spi_match);
-#else /* CONFIG_OF */
-#define altera_spi_match NULL
 #endif /* CONFIG_OF */
 
 static struct platform_driver altera_spi_driver = {
@@ -318,7 +316,7 @@ static struct platform_driver altera_spi_driver = {
 		.name = DRV_NAME,
 		.owner = THIS_MODULE,
 		.pm = NULL,
-		.of_match_table = altera_spi_match,
+		.of_match_table = of_match_ptr(altera_spi_match),
 	},
 };
 module_platform_driver(altera_spi_driver);
-- 
1.7.5.4

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

* Re: [PATCH] spi: spi-altera: Use of_match_ptr
       [not found] ` <1345015828-8444-1-git-send-email-tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
@ 2012-08-15 13:09   ` Rob Herring
       [not found]     ` <502B9F73.4040508-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2012-08-15 16:18   ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Rob Herring @ 2012-08-15 13:09 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	Mark Brown (broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org)

On 08/15/2012 02:30 AM, Tobias Klauser wrote:
> Instead of having to define the match table to NULL if CONFIG_OF isn't
> set, use the of_match_ptr() macro which will do this for us.
> 
> Signed-off-by: Tobias Klauser <tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>

Acked-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

Adding Mark B. as he is helping Grant out with spi.

Rob

> ---
>  drivers/spi/spi-altera.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
> index c00d00e..f1fec2a 100644
> --- a/drivers/spi/spi-altera.c
> +++ b/drivers/spi/spi-altera.c
> @@ -307,8 +307,6 @@ static const struct of_device_id altera_spi_match[] = {
>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, altera_spi_match);
> -#else /* CONFIG_OF */
> -#define altera_spi_match NULL
>  #endif /* CONFIG_OF */
>  
>  static struct platform_driver altera_spi_driver = {
> @@ -318,7 +316,7 @@ static struct platform_driver altera_spi_driver = {
>  		.name = DRV_NAME,
>  		.owner = THIS_MODULE,
>  		.pm = NULL,
> -		.of_match_table = altera_spi_match,
> +		.of_match_table = of_match_ptr(altera_spi_match),
>  	},
>  };
>  module_platform_driver(altera_spi_driver);
> 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

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

* Re: [PATCH] spi: spi-altera: Use of_match_ptr
       [not found]     ` <502B9F73.4040508-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2012-08-15 14:00       ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-08-15 14:00 UTC (permalink / raw)
  To: Rob Herring
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Tobias Klauser, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Wed, Aug 15, 2012 at 08:09:07AM -0500, Rob Herring wrote:
> On 08/15/2012 02:30 AM, Tobias Klauser wrote:
> > Instead of having to define the match table to NULL if CONFIG_OF isn't
> > set, use the of_match_ptr() macro which will do this for us.
> > 
> > Signed-off-by: Tobias Klauser <tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>

> Acked-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

> Adding Mark B. as he is helping Grant out with spi.

Please send me the patch directly (ie, not quoted).

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

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

* Re: [PATCH] spi: spi-altera: Use of_match_ptr
       [not found] ` <1345015828-8444-1-git-send-email-tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
  2012-08-15 13:09   ` Rob Herring
@ 2012-08-15 16:18   ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-08-15 16:18 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring

On Wed, Aug 15, 2012 at 09:30:28AM +0200, Tobias Klauser wrote:
> Instead of having to define the match table to NULL if CONFIG_OF isn't
> set, use the of_match_ptr() macro which will do this for us.

Applied, thanks.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

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

end of thread, other threads:[~2012-08-15 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-15  7:30 [PATCH] spi: spi-altera: Use of_match_ptr Tobias Klauser
     [not found] ` <1345015828-8444-1-git-send-email-tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
2012-08-15 13:09   ` Rob Herring
     [not found]     ` <502B9F73.4040508-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-08-15 14:00       ` Mark Brown
2012-08-15 16:18   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).