diff mbox

[1/2] spi: spi-oc-tiny: Use of_match_ptr() macro

Message ID 1363255311-18151-1-git-send-email-sachin.kamat@linaro.org (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Sachin Kamat March 14, 2013, 10:01 a.m. UTC
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

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

Comments

Thomas Chou March 15, 2013, 2:50 a.m. UTC | #1
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@linaro.org>
> Cc: Thomas Chou <thomas@wytron.com.tw>
> ---
>   drivers/spi/spi-oc-tiny.c |    4 +---
>   1 files changed, 1 insertions(+), 3 deletions(-)

Acked-by: Thomas Chou <thomas@wytron.com.tw>

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
Sachin Kamat March 26, 2013, 4:57 p.m. UTC | #2
On 15 March 2013 08:20, Thomas Chou <thomas@wytron.com.tw> 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@linaro.org>
>> Cc: Thomas Chou <thomas@wytron.com.tw>
>> ---
>>   drivers/spi/spi-oc-tiny.c |    4 +---
>>   1 files changed, 1 insertions(+), 3 deletions(-)
>
>
> Acked-by: Thomas Chou <thomas@wytron.com.tw>
>

Mark,

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

Patch

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