linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: gpio-regulator: Add ifdef CONFIG_OF guard for regulator_gpio_of_match
@ 2012-12-04  2:32 Axel Lin
  2012-12-06  6:22 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-12-04  2:32 UTC (permalink / raw)
  To: Mark Brown
  Cc: Frank Li, Lee Jones, Heiko Stuebner, Liam Girdwood, linux-kernel

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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regulator: gpio-regulator: Add ifdef CONFIG_OF guard for regulator_gpio_of_match
  2012-12-04  2:32 [PATCH] regulator: gpio-regulator: Add ifdef CONFIG_OF guard for regulator_gpio_of_match Axel Lin
@ 2012-12-06  6:22 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-12-06  6:22 UTC (permalink / raw)
  To: Axel Lin; +Cc: Frank Li, Lee Jones, Heiko Stuebner, Liam Girdwood, linux-kernel

On Tue, Dec 04, 2012 at 10:32:05AM +0800, Axel Lin wrote:
> Use of_match_ptr and add ifdef CONFIG_OF guard for regulator_gpio_of_match.

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-06  6:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-04  2:32 [PATCH] regulator: gpio-regulator: Add ifdef CONFIG_OF guard for regulator_gpio_of_match Axel Lin
2012-12-06  6:22 ` Mark Brown

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