diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-07-04 21:38:15 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-05 08:34:39 -0400 |
commit | 6c3b956b94a6547d26c805db7c505429e54e7573 (patch) | |
tree | 49408a124ad355acc23770dce9173916cd850c1b /drivers/regulator | |
parent | f8568cbd9459b87d989efdd9c67a9dd9c6ebef3b (diff) |
regulator: ab3100: Use rdev_get_drvdata() rather than use reg->reg_data 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>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/ab3100.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c index 5f771a86f6e6..182b553059c9 100644 --- a/drivers/regulator/ab3100.c +++ b/drivers/regulator/ab3100.c | |||
@@ -155,7 +155,7 @@ ab3100_regulators[AB3100_NUM_REGULATORS] = { | |||
155 | */ | 155 | */ |
156 | static int ab3100_enable_regulator(struct regulator_dev *reg) | 156 | static int ab3100_enable_regulator(struct regulator_dev *reg) |
157 | { | 157 | { |
158 | struct ab3100_regulator *abreg = reg->reg_data; | 158 | struct ab3100_regulator *abreg = rdev_get_drvdata(reg); |
159 | int err; | 159 | int err; |
160 | u8 regval; | 160 | u8 regval; |
161 | 161 | ||
@@ -186,7 +186,7 @@ static int ab3100_enable_regulator(struct regulator_dev *reg) | |||
186 | 186 | ||
187 | static int ab3100_disable_regulator(struct regulator_dev *reg) | 187 | static int ab3100_disable_regulator(struct regulator_dev *reg) |
188 | { | 188 | { |
189 | struct ab3100_regulator *abreg = reg->reg_data; | 189 | struct ab3100_regulator *abreg = rdev_get_drvdata(reg); |
190 | int err; | 190 | int err; |
191 | u8 regval; | 191 | u8 regval; |
192 | 192 | ||
@@ -219,7 +219,7 @@ static int ab3100_disable_regulator(struct regulator_dev *reg) | |||
219 | 219 | ||
220 | static int ab3100_is_enabled_regulator(struct regulator_dev *reg) | 220 | static int ab3100_is_enabled_regulator(struct regulator_dev *reg) |
221 | { | 221 | { |
222 | struct ab3100_regulator *abreg = reg->reg_data; | 222 | struct ab3100_regulator *abreg = rdev_get_drvdata(reg); |
223 | u8 regval; | 223 | u8 regval; |
224 | int err; | 224 | int err; |
225 | 225 | ||
@@ -236,7 +236,7 @@ static int ab3100_is_enabled_regulator(struct regulator_dev *reg) | |||
236 | 236 | ||
237 | static int ab3100_get_voltage_regulator(struct regulator_dev *reg) | 237 | static int ab3100_get_voltage_regulator(struct regulator_dev *reg) |
238 | { | 238 | { |
239 | struct ab3100_regulator *abreg = reg->reg_data; | 239 | struct ab3100_regulator *abreg = rdev_get_drvdata(reg); |
240 | u8 regval; | 240 | u8 regval; |
241 | int err; | 241 | int err; |
242 | 242 | ||
@@ -270,7 +270,7 @@ static int ab3100_get_voltage_regulator(struct regulator_dev *reg) | |||
270 | static int ab3100_set_voltage_regulator_sel(struct regulator_dev *reg, | 270 | static int ab3100_set_voltage_regulator_sel(struct regulator_dev *reg, |
271 | unsigned selector) | 271 | unsigned selector) |
272 | { | 272 | { |
273 | struct ab3100_regulator *abreg = reg->reg_data; | 273 | struct ab3100_regulator *abreg = rdev_get_drvdata(reg); |
274 | u8 regval; | 274 | u8 regval; |
275 | int err; | 275 | int err; |
276 | 276 | ||
@@ -299,7 +299,7 @@ static int ab3100_set_voltage_regulator_sel(struct regulator_dev *reg, | |||
299 | static int ab3100_set_suspend_voltage_regulator(struct regulator_dev *reg, | 299 | static int ab3100_set_suspend_voltage_regulator(struct regulator_dev *reg, |
300 | int uV) | 300 | int uV) |
301 | { | 301 | { |
302 | struct ab3100_regulator *abreg = reg->reg_data; | 302 | struct ab3100_regulator *abreg = rdev_get_drvdata(reg); |
303 | u8 regval; | 303 | u8 regval; |
304 | int err; | 304 | int err; |
305 | int bestindex; | 305 | int bestindex; |
@@ -342,7 +342,7 @@ static int ab3100_set_suspend_voltage_regulator(struct regulator_dev *reg, | |||
342 | */ | 342 | */ |
343 | static int ab3100_get_voltage_regulator_external(struct regulator_dev *reg) | 343 | static int ab3100_get_voltage_regulator_external(struct regulator_dev *reg) |
344 | { | 344 | { |
345 | struct ab3100_regulator *abreg = reg->reg_data; | 345 | struct ab3100_regulator *abreg = rdev_get_drvdata(reg); |
346 | 346 | ||
347 | return abreg->plfdata->external_voltage; | 347 | return abreg->plfdata->external_voltage; |
348 | } | 348 | } |