regulator: of: Add stub OF match function for !OF case
Signed-off-by: Mark Brown <broonie@kernel.org>
diff --git a/drivers/regulator/internal.h b/drivers/regulator/internal.h
index a6043ad..80ba2a3 100644
--- a/drivers/regulator/internal.h
+++ b/drivers/regulator/internal.h
@@ -35,8 +35,18 @@
struct dentry *debugfs;
};
+#ifdef CONFIG_OF
struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
const struct regulator_desc *desc,
struct device_node **node);
+#else
+static inline struct regulator_init_data *
+regulator_of_get_init_data(struct device *dev,
+ const struct regulator_desc *desc,
+ struct device_node **node)
+{
+ return NULL;
+}
+#endif
#endif