Browse Source

regulator: of: Add stub OF match function for !OF case

Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown 11 years ago
parent
commit
ef126a4a81
1 changed files with 10 additions and 0 deletions
  1. 10 0
      drivers/regulator/internal.h

+ 10 - 0
drivers/regulator/internal.h

@@ -35,8 +35,18 @@ struct regulator {
 	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