From: Axel Lin <axel.lin@ingics.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>,
Jisheng Zhang <jszhang@marvell.com>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: [PATCH] mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro
Date: Tue, 05 May 2015 17:11:54 +0800 [thread overview]
Message-ID: <1430817114.20613.1.camel@ingics.com> (raw)
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
next reply other threads:[~2015-05-05 9:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 9:11 Axel Lin [this message]
2015-05-05 9:24 ` [PATCH] mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430817114.20613.1.camel@ingics.com \
--to=axel.lin@ingics.com \
--cc=gregory.clement@free-electrons.com \
--cc=jszhang@marvell.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox