* [PATCH] mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro
@ 2013-03-20 7:48 Axel Lin
0 siblings, 0 replies; 5+ messages in thread
From: Axel Lin @ 2013-03-20 7:48 UTC (permalink / raw)
To: Chris Ball; +Cc: Zhangfei Gao, Kevin Liu, Philip Rakity, linux-mmc
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/mmc/host/sdhci-pxav2.c | 4 +---
drivers/mmc/host/sdhci-pxav3.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c
index eeb7d43..d57c047 100644
--- a/drivers/mmc/host/sdhci-pxav2.c
+++ b/drivers/mmc/host/sdhci-pxav2.c
@@ -262,9 +262,7 @@ static struct platform_driver sdhci_pxav2_driver = {
.driver = {
.name = "sdhci-pxav2",
.owner = THIS_MODULE,
-#ifdef CONFIG_OF
- .of_match_table = sdhci_pxav2_of_match,
-#endif
+ .of_match_table = of_match_ptr(sdhci_pxav2_of_match),
.pm = SDHCI_PLTFM_PMOPS,
},
.probe = sdhci_pxav2_probe,
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index a0cdbc5..bbadfbd 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -439,9 +439,7 @@ static const struct dev_pm_ops sdhci_pxav3_pmops = {
static struct platform_driver sdhci_pxav3_driver = {
.driver = {
.name = "sdhci-pxav3",
-#ifdef CONFIG_OF
- .of_match_table = sdhci_pxav3_of_match,
-#endif
+ .of_match_table = of_match_ptr(sdhci_pxav3_of_match),
.owner = THIS_MODULE,
.pm = SDHCI_PXAV3_PMOPS,
},
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro
[not found] <25B60CDC2F704E4E9D88FFD52780CB4C0BDEC869A4@SC-VEXCH1.marvell.com>
@ 2013-03-21 12:41 ` Kevin Liu
0 siblings, 0 replies; 5+ messages in thread
From: Kevin Liu @ 2013-03-21 12:41 UTC (permalink / raw)
To: Axel Lin; +Cc: Chris Ball, Philip Rakity, zhangfei gao, linux-mmc
> -----Original Message-----
> From: Axel Lin [mailto:axel.lin@ingics.com]
> Sent: Wednesday, March 20, 2013 3:49 PM
> To: Chris Ball
> Cc: Zhangfei Gao; Kevin Liu; Philip Rakity; linux-mmc@vger.kernel.org
> Subject: [PATCH] mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro
>
> This eliminates having an #ifdef returning NULL for the case
> when OF is disabled.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/mmc/host/sdhci-pxav2.c | 4 +---
> drivers/mmc/host/sdhci-pxav3.c | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c
> index eeb7d43..d57c047 100644
> --- a/drivers/mmc/host/sdhci-pxav2.c
> +++ b/drivers/mmc/host/sdhci-pxav2.c
> @@ -262,9 +262,7 @@ static struct platform_driver sdhci_pxav2_driver = {
> .driver = {
> .name = "sdhci-pxav2",
> .owner = THIS_MODULE,
> -#ifdef CONFIG_OF
> - .of_match_table = sdhci_pxav2_of_match,
> -#endif
> + .of_match_table = of_match_ptr(sdhci_pxav2_of_match),
> .pm = SDHCI_PLTFM_PMOPS,
> },
> .probe = sdhci_pxav2_probe,
> diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
> index a0cdbc5..bbadfbd 100644
> --- a/drivers/mmc/host/sdhci-pxav3.c
> +++ b/drivers/mmc/host/sdhci-pxav3.c
> @@ -439,9 +439,7 @@ static const struct dev_pm_ops sdhci_pxav3_pmops = {
> static struct platform_driver sdhci_pxav3_driver = {
> .driver = {
> .name = "sdhci-pxav3",
> -#ifdef CONFIG_OF
> - .of_match_table = sdhci_pxav3_of_match,
> -#endif
> + .of_match_table = of_match_ptr(sdhci_pxav3_of_match),
> .owner = THIS_MODULE,
> .pm = SDHCI_PXAV3_PMOPS,
> },
>
Reviewed-by: Kevin Liu <kliu5@marvell.com>
--
> 1.7.9.5
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro
@ 2015-05-05 9:11 Axel Lin
2015-05-05 9:24 ` Jisheng Zhang
0 siblings, 1 reply; 5+ messages in thread
From: Axel Lin @ 2015-05-05 9:11 UTC (permalink / raw)
To: Ulf Hansson; +Cc: Gregory CLEMENT, Jisheng Zhang, linux-mmc@vger.kernel.org
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/mmc/host/sdhci-pxav2.c | 4 +---
drivers/mmc/host/sdhci-pxav3.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c
index f98008b..beffd86 100644
--- a/drivers/mmc/host/sdhci-pxav2.c
+++ b/drivers/mmc/host/sdhci-pxav2.c
@@ -252,9 +252,7 @@ static int sdhci_pxav2_remove(struct platform_device *pdev)
static struct platform_driver sdhci_pxav2_driver = {
.driver = {
.name = "sdhci-pxav2",
-#ifdef CONFIG_OF
- .of_match_table = sdhci_pxav2_of_match,
-#endif
+ .of_match_table = of_match_ptr(sdhci_pxav2_of_match),
.pm = SDHCI_PLTFM_PMOPS,
},
.probe = sdhci_pxav2_probe,
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index b5103a2..01cb2d3 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -578,9 +578,7 @@ static const struct dev_pm_ops sdhci_pxav3_pmops = {
static struct platform_driver sdhci_pxav3_driver = {
.driver = {
.name = "sdhci-pxav3",
-#ifdef CONFIG_OF
- .of_match_table = sdhci_pxav3_of_match,
-#endif
+ .of_match_table = of_match_ptr(sdhci_pxav3_of_match),
.pm = SDHCI_PXAV3_PMOPS,
},
.probe = sdhci_pxav3_probe,
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro
2015-05-05 9:11 [PATCH] mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro Axel Lin
@ 2015-05-05 9:24 ` Jisheng Zhang
2015-05-05 10:34 ` Ulf Hansson
0 siblings, 1 reply; 5+ messages in thread
From: Jisheng Zhang @ 2015-05-05 9:24 UTC (permalink / raw)
To: Axel Lin; +Cc: Ulf Hansson, Gregory CLEMENT, linux-mmc@vger.kernel.org
On Tue, 5 May 2015 02:11:54 -0700
Axel Lin <axel.lin@ingics.com> wrote:
> This eliminates having an #ifdef returning NULL for the case
> when OF is disabled.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/mmc/host/sdhci-pxav2.c | 4 +---
> drivers/mmc/host/sdhci-pxav3.c | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c
> index f98008b..beffd86 100644
> --- a/drivers/mmc/host/sdhci-pxav2.c
> +++ b/drivers/mmc/host/sdhci-pxav2.c
> @@ -252,9 +252,7 @@ static int sdhci_pxav2_remove(struct platform_device *pdev)
> static struct platform_driver sdhci_pxav2_driver = {
> .driver = {
> .name = "sdhci-pxav2",
> -#ifdef CONFIG_OF
> - .of_match_table = sdhci_pxav2_of_match,
> -#endif
> + .of_match_table = of_match_ptr(sdhci_pxav2_of_match),
> .pm = SDHCI_PLTFM_PMOPS,
> },
> .probe = sdhci_pxav2_probe,
> diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
> index b5103a2..01cb2d3 100644
> --- a/drivers/mmc/host/sdhci-pxav3.c
> +++ b/drivers/mmc/host/sdhci-pxav3.c
> @@ -578,9 +578,7 @@ static const struct dev_pm_ops sdhci_pxav3_pmops = {
> static struct platform_driver sdhci_pxav3_driver = {
> .driver = {
> .name = "sdhci-pxav3",
> -#ifdef CONFIG_OF
> - .of_match_table = sdhci_pxav3_of_match,
> -#endif
> + .of_match_table = of_match_ptr(sdhci_pxav3_of_match),
> .pm = SDHCI_PXAV3_PMOPS,
> },
> .probe = sdhci_pxav3_probe,
Looks good to me.
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro
2015-05-05 9:24 ` Jisheng Zhang
@ 2015-05-05 10:34 ` Ulf Hansson
0 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2015-05-05 10:34 UTC (permalink / raw)
To: Jisheng Zhang, Axel Lin; +Cc: Gregory CLEMENT, linux-mmc@vger.kernel.org
On 5 May 2015 at 11:24, Jisheng Zhang <jszhang@marvell.com> wrote:
> On Tue, 5 May 2015 02:11:54 -0700
> Axel Lin <axel.lin@ingics.com> wrote:
>
>> This eliminates having an #ifdef returning NULL for the case
>> when OF is disabled.
>>
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>> ---
>> drivers/mmc/host/sdhci-pxav2.c | 4 +---
>> drivers/mmc/host/sdhci-pxav3.c | 4 +---
>> 2 files changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c
>> index f98008b..beffd86 100644
>> --- a/drivers/mmc/host/sdhci-pxav2.c
>> +++ b/drivers/mmc/host/sdhci-pxav2.c
>> @@ -252,9 +252,7 @@ static int sdhci_pxav2_remove(struct platform_device *pdev)
>> static struct platform_driver sdhci_pxav2_driver = {
>> .driver = {
>> .name = "sdhci-pxav2",
>> -#ifdef CONFIG_OF
>> - .of_match_table = sdhci_pxav2_of_match,
>> -#endif
>> + .of_match_table = of_match_ptr(sdhci_pxav2_of_match),
>> .pm = SDHCI_PLTFM_PMOPS,
>> },
>> .probe = sdhci_pxav2_probe,
>> diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
>> index b5103a2..01cb2d3 100644
>> --- a/drivers/mmc/host/sdhci-pxav3.c
>> +++ b/drivers/mmc/host/sdhci-pxav3.c
>> @@ -578,9 +578,7 @@ static const struct dev_pm_ops sdhci_pxav3_pmops = {
>> static struct platform_driver sdhci_pxav3_driver = {
>> .driver = {
>> .name = "sdhci-pxav3",
>> -#ifdef CONFIG_OF
>> - .of_match_table = sdhci_pxav3_of_match,
>> -#endif
>> + .of_match_table = of_match_ptr(sdhci_pxav3_of_match),
>> .pm = SDHCI_PXAV3_PMOPS,
>> },
>> .probe = sdhci_pxav3_probe,
>
> Looks good to me.
>
> Thanks
I consider that as an ack.
Thanks, applied.
Kind regards
Uffe
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-05 10:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-05 9:11 [PATCH] mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro Axel Lin
2015-05-05 9:24 ` Jisheng Zhang
2015-05-05 10:34 ` Ulf Hansson
[not found] <25B60CDC2F704E4E9D88FFD52780CB4C0BDEC869A4@SC-VEXCH1.marvell.com>
2013-03-21 12:41 ` Kevin Liu
-- strict thread matches above, loose matches on Subject: below --
2013-03-20 7:48 Axel Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox