2013-03-14 10:27:50

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 1/1] crypto: picoxcell_crypto: Use of_match_ptr() macro

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

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/crypto/picoxcell_crypto.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c
index 2096d46..ac30724 100644
--- a/drivers/crypto/picoxcell_crypto.c
+++ b/drivers/crypto/picoxcell_crypto.c
@@ -1688,8 +1688,6 @@ static const struct of_device_id spacc_of_id_table[] = {
{ .compatible = "picochip,spacc-l2" },
{}
};
-#else /* CONFIG_OF */
-#define spacc_of_id_table NULL
#endif /* CONFIG_OF */

static bool spacc_is_compatible(struct platform_device *pdev,
@@ -1874,7 +1872,7 @@ static struct platform_driver spacc_driver = {
#ifdef CONFIG_PM
.pm = &spacc_pm_ops,
#endif /* CONFIG_PM */
- .of_match_table = spacc_of_id_table,
+ .of_match_table = of_match_ptr(spacc_of_id_table),
},
.id_table = spacc_id_table,
};
--
1.7.4.1


2013-03-15 09:49:06

by Jamie Iles

[permalink] [raw]
Subject: Re: [PATCH 1/1] crypto: picoxcell_crypto: Use of_match_ptr() macro

Thanks Sachin!

On Thu, Mar 14, 2013 at 03:46:58PM +0530, Sachin Kamat wrote:
> This eliminates having an #ifdef returning NULL for the case
> when OF is disabled.
>
> Signed-off-by: Sachin Kamat <[email protected]>

Acked-by: Jamie Iles <[email protected]>

2013-03-21 09:55:33

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH 1/1] crypto: picoxcell_crypto: Use of_match_ptr() macro

On Fri, Mar 15, 2013 at 09:54:05AM +0000, Jamie Iles wrote:
> Thanks Sachin!
>
> On Thu, Mar 14, 2013 at 03:46:58PM +0530, Sachin Kamat wrote:
> > This eliminates having an #ifdef returning NULL for the case
> > when OF is disabled.
> >
> > Signed-off-by: Sachin Kamat <[email protected]>
>
> Acked-by: Jamie Iles <[email protected]>

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt