diff options
author | Axel Lin <axel.lin@ingics.com> | 2012-12-03 21:32:05 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-06 01:22:52 -0500 |
commit | ec4f7b88b4a89253ec922d48f77b269ce5cffc2c (patch) | |
tree | 41350fe383803537cc6ccb7aa9edc44b20e3cc85 /drivers/regulator/gpio-regulator.c | |
parent | 216f2b9c95ac6e4f00b08df807bc4454434a9afb (diff) |
regulator: gpio-regulator: Add ifdef CONFIG_OF guard for regulator_gpio_of_match
Use of_match_ptr and add ifdef CONFIG_OF guard for regulator_gpio_of_match.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/gpio-regulator.c')
-rw-r--r-- | drivers/regulator/gpio-regulator.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index dc9260545b80..8c4e23739494 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c | |||
@@ -364,10 +364,12 @@ static int __devexit gpio_regulator_remove(struct platform_device *pdev) | |||
364 | return 0; | 364 | return 0; |
365 | } | 365 | } |
366 | 366 | ||
367 | #if defined(CONFIG_OF) | ||
367 | static const struct of_device_id regulator_gpio_of_match[] __devinitconst = { | 368 | static const struct of_device_id regulator_gpio_of_match[] __devinitconst = { |
368 | { .compatible = "regulator-gpio", }, | 369 | { .compatible = "regulator-gpio", }, |
369 | {}, | 370 | {}, |
370 | }; | 371 | }; |
372 | #endif | ||
371 | 373 | ||
372 | static struct platform_driver gpio_regulator_driver = { | 374 | static struct platform_driver gpio_regulator_driver = { |
373 | .probe = gpio_regulator_probe, | 375 | .probe = gpio_regulator_probe, |
@@ -375,7 +377,7 @@ static struct platform_driver gpio_regulator_driver = { | |||
375 | .driver = { | 377 | .driver = { |
376 | .name = "gpio-regulator", | 378 | .name = "gpio-regulator", |
377 | .owner = THIS_MODULE, | 379 | .owner = THIS_MODULE, |
378 | .of_match_table = regulator_gpio_of_match, | 380 | .of_match_table = of_match_ptr(regulator_gpio_of_match), |
379 | }, | 381 | }, |
380 | }; | 382 | }; |
381 | 383 | ||