Skip to content

Commit

Permalink
regulator: ab3100: Use rdev_get_drvdata() rather than use reg->reg_da…
Browse files Browse the repository at this point in the history
…ta driectly

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Jul 5, 2012
1 parent f8568cb commit 6c3b956
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/regulator/ab3100.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ ab3100_regulators[AB3100_NUM_REGULATORS] = {
*/
static int ab3100_enable_regulator(struct regulator_dev *reg)
{
struct ab3100_regulator *abreg = reg->reg_data;
struct ab3100_regulator *abreg = rdev_get_drvdata(reg);
int err;
u8 regval;

Expand Down Expand Up @@ -186,7 +186,7 @@ static int ab3100_enable_regulator(struct regulator_dev *reg)

static int ab3100_disable_regulator(struct regulator_dev *reg)
{
struct ab3100_regulator *abreg = reg->reg_data;
struct ab3100_regulator *abreg = rdev_get_drvdata(reg);
int err;
u8 regval;

Expand Down Expand Up @@ -219,7 +219,7 @@ static int ab3100_disable_regulator(struct regulator_dev *reg)

static int ab3100_is_enabled_regulator(struct regulator_dev *reg)
{
struct ab3100_regulator *abreg = reg->reg_data;
struct ab3100_regulator *abreg = rdev_get_drvdata(reg);
u8 regval;
int err;

Expand All @@ -236,7 +236,7 @@ static int ab3100_is_enabled_regulator(struct regulator_dev *reg)

static int ab3100_get_voltage_regulator(struct regulator_dev *reg)
{
struct ab3100_regulator *abreg = reg->reg_data;
struct ab3100_regulator *abreg = rdev_get_drvdata(reg);
u8 regval;
int err;

Expand Down Expand Up @@ -270,7 +270,7 @@ static int ab3100_get_voltage_regulator(struct regulator_dev *reg)
static int ab3100_set_voltage_regulator_sel(struct regulator_dev *reg,
unsigned selector)
{
struct ab3100_regulator *abreg = reg->reg_data;
struct ab3100_regulator *abreg = rdev_get_drvdata(reg);
u8 regval;
int err;

Expand Down Expand Up @@ -299,7 +299,7 @@ static int ab3100_set_voltage_regulator_sel(struct regulator_dev *reg,
static int ab3100_set_suspend_voltage_regulator(struct regulator_dev *reg,
int uV)
{
struct ab3100_regulator *abreg = reg->reg_data;
struct ab3100_regulator *abreg = rdev_get_drvdata(reg);
u8 regval;
int err;
int bestindex;
Expand Down Expand Up @@ -342,7 +342,7 @@ static int ab3100_set_suspend_voltage_regulator(struct regulator_dev *reg,
*/
static int ab3100_get_voltage_regulator_external(struct regulator_dev *reg)
{
struct ab3100_regulator *abreg = reg->reg_data;
struct ab3100_regulator *abreg = rdev_get_drvdata(reg);

return abreg->plfdata->external_voltage;
}
Expand Down

0 comments on commit 6c3b956

Please sign in to comment.