linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] spi: spi-oc-tiny: Use of_match_ptr() macro
@ 2013-03-14 10:01 Sachin Kamat
       [not found] ` <1363255311-18151-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Sachin Kamat @ 2013-03-14 10:01 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: sachin.kamat-QSEj5FYQhm4dnm+yROfE0A,
	broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E, Thomas Chou

This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Thomas Chou <thomas-SDxUXYEhEBiCuPEqFHbRBg@public.gmane.org>
---
 drivers/spi/spi-oc-tiny.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c
index cb2e284..e60a776 100644
--- a/drivers/spi/spi-oc-tiny.c
+++ b/drivers/spi/spi-oc-tiny.c
@@ -393,8 +393,6 @@ static const struct of_device_id tiny_spi_match[] = {
 	{},
 };
 MODULE_DEVICE_TABLE(of, tiny_spi_match);
-#else /* CONFIG_OF */
-#define tiny_spi_match NULL
 #endif /* CONFIG_OF */
 
 static struct platform_driver tiny_spi_driver = {
@@ -404,7 +402,7 @@ static struct platform_driver tiny_spi_driver = {
 		.name = DRV_NAME,
 		.owner = THIS_MODULE,
 		.pm = NULL,
-		.of_match_table = tiny_spi_match,
+		.of_match_table = of_match_ptr(tiny_spi_match),
 	},
 };
 module_platform_driver(tiny_spi_driver);
-- 
1.7.4.1


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar

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

* [PATCH 2/2] spi: spi-sh-msiof: Use of_match_ptr() macro
       [not found] ` <1363255311-18151-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
@ 2013-03-14 10:01   ` Sachin Kamat
  2013-03-15  2:50   ` [PATCH 1/2] spi: spi-oc-tiny: " Thomas Chou
  1 sibling, 0 replies; 4+ messages in thread
From: Sachin Kamat @ 2013-03-14 10:01 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: sachin.kamat-QSEj5FYQhm4dnm+yROfE0A,
	broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E

This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 drivers/spi/spi-sh-msiof.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
index 8b40d08..2bc5a6b 100644
--- a/drivers/spi/spi-sh-msiof.c
+++ b/drivers/spi/spi-sh-msiof.c
@@ -764,8 +764,6 @@ static const struct of_device_id sh_msiof_match[] = {
 	{},
 };
 MODULE_DEVICE_TABLE(of, sh_msiof_match);
-#else
-#define sh_msiof_match NULL
 #endif
 
 static struct dev_pm_ops sh_msiof_spi_dev_pm_ops = {
@@ -780,7 +778,7 @@ static struct platform_driver sh_msiof_spi_drv = {
 		.name		= "spi_sh_msiof",
 		.owner		= THIS_MODULE,
 		.pm		= &sh_msiof_spi_dev_pm_ops,
-		.of_match_table = sh_msiof_match,
+		.of_match_table = of_match_ptr(sh_msiof_match),
 	},
 };
 module_platform_driver(sh_msiof_spi_drv);
-- 
1.7.4.1


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar

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

* Re: [PATCH 1/2] spi: spi-oc-tiny: Use of_match_ptr() macro
       [not found] ` <1363255311-18151-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
  2013-03-14 10:01   ` [PATCH 2/2] spi: spi-sh-msiof: " Sachin Kamat
@ 2013-03-15  2:50   ` Thomas Chou
       [not found]     ` <51428C69.2080508-SDxUXYEhEBiCuPEqFHbRBg@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Chou @ 2013-03-15  2:50 UTC (permalink / raw)
  To: Sachin Kamat
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E

Hi Sachin,

On 03/14/2013 06:01 PM, Sachin Kamat wrote:
> This eliminates having an #ifdef returning NULL for the case
> when OF is disabled.
>
> Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Thomas Chou <thomas-SDxUXYEhEBiCuPEqFHbRBg@public.gmane.org>
> ---
>   drivers/spi/spi-oc-tiny.c |    4 +---
>   1 files changed, 1 insertions(+), 3 deletions(-)

Acked-by: Thomas Chou <thomas-SDxUXYEhEBiCuPEqFHbRBg@public.gmane.org>

Thanks.
Thomas

>
> diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c
> index cb2e284..e60a776 100644
> --- a/drivers/spi/spi-oc-tiny.c
> +++ b/drivers/spi/spi-oc-tiny.c
> @@ -393,8 +393,6 @@ static const struct of_device_id tiny_spi_match[] = {
>   	{},
>   };
>   MODULE_DEVICE_TABLE(of, tiny_spi_match);
> -#else /* CONFIG_OF */
> -#define tiny_spi_match NULL
>   #endif /* CONFIG_OF */
>
>   static struct platform_driver tiny_spi_driver = {
> @@ -404,7 +402,7 @@ static struct platform_driver tiny_spi_driver = {
>   		.name = DRV_NAME,
>   		.owner = THIS_MODULE,
>   		.pm = NULL,
> -		.of_match_table = tiny_spi_match,
> +		.of_match_table = of_match_ptr(tiny_spi_match),
>   	},
>   };
>   module_platform_driver(tiny_spi_driver);
>



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar

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

* Re: [PATCH 1/2] spi: spi-oc-tiny: Use of_match_ptr() macro
       [not found]     ` <51428C69.2080508-SDxUXYEhEBiCuPEqFHbRBg@public.gmane.org>
@ 2013-03-26 16:57       ` Sachin Kamat
  0 siblings, 0 replies; 4+ messages in thread
From: Sachin Kamat @ 2013-03-26 16:57 UTC (permalink / raw)
  To: Mark Brown; +Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On 15 March 2013 08:20, Thomas Chou <thomas-SDxUXYEhEBiCuPEqFHbRBg@public.gmane.org> wrote:
> Hi Sachin,
>
>
> On 03/14/2013 06:01 PM, Sachin Kamat wrote:
>>
>> This eliminates having an #ifdef returning NULL for the case
>> when OF is disabled.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> Cc: Thomas Chou <thomas-SDxUXYEhEBiCuPEqFHbRBg@public.gmane.org>
>> ---
>>   drivers/spi/spi-oc-tiny.c |    4 +---
>>   1 files changed, 1 insertions(+), 3 deletions(-)
>
>
> Acked-by: Thomas Chou <thomas-SDxUXYEhEBiCuPEqFHbRBg@public.gmane.org>
>

Mark,

Would you be picking this patch or Grant's gonna take it?

-- 
With warm regards,
Sachin

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d

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

end of thread, other threads:[~2013-03-26 16:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-14 10:01 [PATCH 1/2] spi: spi-oc-tiny: Use of_match_ptr() macro Sachin Kamat
     [not found] ` <1363255311-18151-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-03-14 10:01   ` [PATCH 2/2] spi: spi-sh-msiof: " Sachin Kamat
2013-03-15  2:50   ` [PATCH 1/2] spi: spi-oc-tiny: " Thomas Chou
     [not found]     ` <51428C69.2080508-SDxUXYEhEBiCuPEqFHbRBg@public.gmane.org>
2013-03-26 16:57       ` Sachin Kamat

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).