Skip to content

Commit

Permalink
regulator: tps62360: make init_data of platform data to pointer.
Browse files Browse the repository at this point in the history
Convert platform data member regulator_init_data to pointer type.
This will avoid the copy of entire regualator init data into
platform data member when adding dt support and it can be achieve
by simple assignment:
pdata->init_data = of_get_regulator_init_data(dev, dev->of_node);

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Laxman Dewangan authored and Mark Brown committed May 13, 2012
1 parent 6790178 commit 8bdca00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/regulator/tps62360-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ static int __devinit tps62360_probe(struct i2c_client *client,
}

config.dev = &client->dev;
config.init_data = &pdata->reg_init_data;
config.init_data = pdata->reg_init_data;
config.driver_data = tps;

/* Register the regulators */
Expand Down
4 changes: 1 addition & 3 deletions include/linux/regulator/tps62360.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef __LINUX_REGULATOR_TPS62360_H
#define __LINUX_REGULATOR_TPS62360_H

#include <linux/regulator/machine.h>

/*
* struct tps62360_regulator_platform_data - tps62360 regulator platform data.
*
Expand All @@ -44,7 +42,7 @@
* @vsel1_def_state: Default state of vsel1. 1 if it is high else 0.
*/
struct tps62360_regulator_platform_data {
struct regulator_init_data reg_init_data;
struct regulator_init_data *reg_init_data;
bool en_force_pwm;
bool en_discharge;
bool en_internal_pulldn;
Expand Down

0 comments on commit 8bdca00

Please sign in to comment.