diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-27 06:36:16 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-27 06:36:16 -0500 |
commit | 6806a663b0a1bb99b18fd5b49e81440eceb2d7a1 (patch) | |
tree | f44cd2ccc862acc70944af3338c2c13c54b322f3 | |
parent | 02fcc84ae551d27c0ef2ee043881cc2afc8f892d (diff) | |
parent | bc91396b0b0a0d1300e151264b81f010c72a8bbf (diff) |
Merge remote-tracking branch 'regulator/topic/dt' into regulator-next
-rw-r--r-- | drivers/regulator/fixed.c | 6 | ||||
-rw-r--r-- | drivers/regulator/of_regulator.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index 716ea375f50f..6828dce72371 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c | |||
@@ -51,7 +51,8 @@ struct fixed_voltage_data { | |||
51 | * tree node, returns a pointer to the populated structure of NULL if memory | 51 | * tree node, returns a pointer to the populated structure of NULL if memory |
52 | * alloc fails. | 52 | * alloc fails. |
53 | */ | 53 | */ |
54 | struct fixed_voltage_config *of_get_fixed_voltage_config(struct device *dev) | 54 | static struct fixed_voltage_config * |
55 | of_get_fixed_voltage_config(struct device *dev) | ||
55 | { | 56 | { |
56 | struct fixed_voltage_config *config; | 57 | struct fixed_voltage_config *config; |
57 | struct device_node *np = dev->of_node; | 58 | struct device_node *np = dev->of_node; |
@@ -64,6 +65,9 @@ struct fixed_voltage_config *of_get_fixed_voltage_config(struct device *dev) | |||
64 | return NULL; | 65 | return NULL; |
65 | 66 | ||
66 | config->init_data = of_get_regulator_init_data(dev); | 67 | config->init_data = of_get_regulator_init_data(dev); |
68 | if (!config->init_data) | ||
69 | return NULL; | ||
70 | |||
67 | init_data = config->init_data; | 71 | init_data = config->init_data; |
68 | 72 | ||
69 | config->supply_name = init_data->constraints.name; | 73 | config->supply_name = init_data->constraints.name; |
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 76673c784ab8..acd7045d1601 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * (at your option) any later version. | 10 | * (at your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | ||
13 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
14 | #include <linux/of.h> | 15 | #include <linux/of.h> |
15 | #include <linux/regulator/machine.h> | 16 | #include <linux/regulator/machine.h> |
@@ -79,3 +80,4 @@ struct regulator_init_data *of_get_regulator_init_data(struct device *dev) | |||
79 | of_get_regulation_constraints(dev->of_node, &init_data); | 80 | of_get_regulation_constraints(dev->of_node, &init_data); |
80 | return init_data; | 81 | return init_data; |
81 | } | 82 | } |
83 | EXPORT_SYMBOL_GPL(of_get_regulator_init_data); | ||