diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-07-11 21:37:37 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-12 13:06:48 -0400 |
commit | 232b25047515127cdf1a84c09de79570de7e4d78 (patch) | |
tree | 70298c28b9d8894c65d7ee711c3f27c01feb3676 /drivers/regulator/s2mps11.c | |
parent | 2693fcab1acf6d6d5cb6d1c4dc9bb8a32e13f782 (diff) |
regulator: s2mps11: Fix wrong setting for config.dev
Currently s2mps11->iodev, s2mps11->dev and config.dev point to NULL.
This patch fixes the settings for config.dev.
Current code does not need the *dev and *iodev of struct s2mps11_info,
so remove them.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/s2mps11.c')
-rw-r--r-- | drivers/regulator/s2mps11.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index da8c3d1e1f52..b3c27058f2a6 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include <linux/mfd/samsung/s2mps11.h> | 24 | #include <linux/mfd/samsung/s2mps11.h> |
25 | 25 | ||
26 | struct s2mps11_info { | 26 | struct s2mps11_info { |
27 | struct device *dev; | ||
28 | struct sec_pmic_dev *iodev; | ||
29 | struct regulator_dev **rdev; | 27 | struct regulator_dev **rdev; |
30 | 28 | ||
31 | int ramp_delay2; | 29 | int ramp_delay2; |
@@ -260,8 +258,6 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev) | |||
260 | } | 258 | } |
261 | 259 | ||
262 | rdev = s2mps11->rdev; | 260 | rdev = s2mps11->rdev; |
263 | config.dev = &pdev->dev; | ||
264 | config.regmap = iodev->regmap; | ||
265 | platform_set_drvdata(pdev, s2mps11); | 261 | platform_set_drvdata(pdev, s2mps11); |
266 | 262 | ||
267 | s2mps11->ramp_delay2 = pdata->buck2_ramp_delay; | 263 | s2mps11->ramp_delay2 = pdata->buck2_ramp_delay; |
@@ -284,7 +280,7 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev) | |||
284 | ramp_reg |= get_ramp_delay(s2mps11->ramp_delay2) >> 6; | 280 | ramp_reg |= get_ramp_delay(s2mps11->ramp_delay2) >> 6; |
285 | if (s2mps11->buck3_ramp || s2mps11->buck4_ramp) | 281 | if (s2mps11->buck3_ramp || s2mps11->buck4_ramp) |
286 | ramp_reg |= get_ramp_delay(s2mps11->ramp_delay34) >> 4; | 282 | ramp_reg |= get_ramp_delay(s2mps11->ramp_delay34) >> 4; |
287 | sec_reg_update(s2mps11->iodev, S2MPS11_REG_RAMP, | 283 | sec_reg_update(iodev, S2MPS11_REG_RAMP, |
288 | ramp_reg | ramp_enable, 0xff); | 284 | ramp_reg | ramp_enable, 0xff); |
289 | } | 285 | } |
290 | 286 | ||
@@ -293,11 +289,11 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev) | |||
293 | ramp_reg |= get_ramp_delay(s2mps11->ramp_delay16) >> 4; | 289 | ramp_reg |= get_ramp_delay(s2mps11->ramp_delay16) >> 4; |
294 | ramp_reg |= get_ramp_delay(s2mps11->ramp_delay7810) >> 2; | 290 | ramp_reg |= get_ramp_delay(s2mps11->ramp_delay7810) >> 2; |
295 | ramp_reg |= get_ramp_delay(s2mps11->ramp_delay9); | 291 | ramp_reg |= get_ramp_delay(s2mps11->ramp_delay9); |
296 | sec_reg_update(s2mps11->iodev, S2MPS11_REG_RAMP_BUCK, ramp_reg, 0xff); | 292 | sec_reg_update(iodev, S2MPS11_REG_RAMP_BUCK, ramp_reg, 0xff); |
297 | 293 | ||
298 | for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) { | 294 | for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) { |
299 | 295 | ||
300 | config.dev = s2mps11->dev; | 296 | config.dev = &pdev->dev; |
301 | config.regmap = iodev->regmap; | 297 | config.regmap = iodev->regmap; |
302 | config.init_data = pdata->regulators[i].initdata; | 298 | config.init_data = pdata->regulators[i].initdata; |
303 | config.driver_data = s2mps11; | 299 | config.driver_data = s2mps11; |
@@ -305,8 +301,8 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev) | |||
305 | rdev[i] = regulator_register(®ulators[i], &config); | 301 | rdev[i] = regulator_register(®ulators[i], &config); |
306 | if (IS_ERR(rdev[i])) { | 302 | if (IS_ERR(rdev[i])) { |
307 | ret = PTR_ERR(rdev[i]); | 303 | ret = PTR_ERR(rdev[i]); |
308 | dev_err(s2mps11->dev, "regulator init failed for %d\n", | 304 | dev_err(&pdev->dev, "regulator init failed for %d\n", |
309 | i); | 305 | i); |
310 | rdev[i] = NULL; | 306 | rdev[i] = NULL; |
311 | goto err; | 307 | goto err; |
312 | } | 308 | } |