Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282187
b: refs/heads/master
c: d9a861c
h: refs/heads/master
i:
  282185: e6c296c
  282183: e745b2e
v: v3
  • Loading branch information
Shawn Guo authored and Mark Brown committed Dec 5, 2011
1 parent 6caddd0 commit 60f44e5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab62aa931ed3512bc67857a03636756b96c78eae
refs/heads/master: d9a861cce10596ae1f10cffefe1ad4519a253475
2 changes: 1 addition & 1 deletion trunk/drivers/regulator/fixed.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ of_get_fixed_voltage_config(struct device *dev)
if (!config)
return NULL;

config->init_data = of_get_regulator_init_data(dev);
config->init_data = of_get_regulator_init_data(dev, dev->of_node);
if (!config->init_data)
return NULL;

Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/regulator/of_regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,19 @@ static void of_get_regulation_constraints(struct device_node *np,
* tree node, returns a pointer to the populated struture or NULL if memory
* alloc fails.
*/
struct regulator_init_data *of_get_regulator_init_data(struct device *dev)
struct regulator_init_data *of_get_regulator_init_data(struct device *dev,
struct device_node *node)
{
struct regulator_init_data *init_data;

if (!dev->of_node)
if (!node)
return NULL;

init_data = devm_kzalloc(dev, sizeof(*init_data), GFP_KERNEL);
if (!init_data)
return NULL; /* Out of memory? */

of_get_regulation_constraints(dev->of_node, &init_data);
of_get_regulation_constraints(node, &init_data);
return init_data;
}
EXPORT_SYMBOL_GPL(of_get_regulator_init_data);
6 changes: 4 additions & 2 deletions trunk/include/linux/regulator/of_regulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@

#if defined(CONFIG_OF)
extern struct regulator_init_data
*of_get_regulator_init_data(struct device *dev);
*of_get_regulator_init_data(struct device *dev,
struct device_node *node);
#else
static inline struct regulator_init_data
*of_get_regulator_init_data(struct device *dev)
*of_get_regulator_init_data(struct device *dev,
struct device_node *node)
{
return NULL;
}
Expand Down

0 comments on commit 60f44e5

Please sign in to comment.