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>
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,
.driver = {
.name = "gpio-regulator",
.owner = THIS_MODULE,
- .of_match_table = regulator_gpio_of_match,
+ .of_match_table = of_match_ptr(regulator_gpio_of_match),
},
};