From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Frank Li <Frank.Li@freescale.com>,
Lee Jones <lee.jones@linaro.org>,
Heiko Stuebner <heiko@sntech.de>, Liam Girdwood <lrg@ti.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] regulator: gpio-regulator: Add ifdef CONFIG_OF guard for regulator_gpio_of_match
Date: Tue, 04 Dec 2012 10:32:05 +0800 [thread overview]
Message-ID: <1354588325.16068.1.camel@phoenix> (raw)
Use of_match_ptr and add ifdef CONFIG_OF guard for regulator_gpio_of_match.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/gpio-regulator.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index 3ee79c8..2cfd9d3 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -364,10 +364,12 @@ static int gpio_regulator_remove(struct platform_device *pdev)
return 0;
}
+#if defined(CONFIG_OF)
static const struct of_device_id regulator_gpio_of_match[] __devinitconst = {
{ .compatible = "regulator-gpio", },
{},
};
+#endif
static struct platform_driver gpio_regulator_driver = {
.probe = gpio_regulator_probe,
@@ -375,7 +377,7 @@ static struct platform_driver gpio_regulator_driver = {
.driver = {
.name = "gpio-regulator",
.owner = THIS_MODULE,
- .of_match_table = regulator_gpio_of_match,
+ .of_match_table = of_match_ptr(regulator_gpio_of_match),
},
};
--
1.7.9.5
next reply other threads:[~2012-12-04 2:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-04 2:32 Axel Lin [this message]
2012-12-06 6:22 ` [PATCH] regulator: gpio-regulator: Add ifdef CONFIG_OF guard for regulator_gpio_of_match Mark Brown
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=1354588325.16068.1.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=Frank.Li@freescale.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=heiko@sntech.de \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).