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>
This commit is contained in:
parent
2693fcab1a
commit
232b250475
|
@ -24,8 +24,6 @@
|
||||||
#include <linux/mfd/samsung/s2mps11.h>
|
#include <linux/mfd/samsung/s2mps11.h>
|
||||||
|
|
||||||
struct s2mps11_info {
|
struct s2mps11_info {
|
||||||
struct device *dev;
|
|
||||||
struct sec_pmic_dev *iodev;
|
|
||||||
struct regulator_dev **rdev;
|
struct regulator_dev **rdev;
|
||||||
|
|
||||||
int ramp_delay2;
|
int ramp_delay2;
|
||||||
|
@ -260,8 +258,6 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
rdev = s2mps11->rdev;
|
rdev = s2mps11->rdev;
|
||||||
config.dev = &pdev->dev;
|
|
||||||
config.regmap = iodev->regmap;
|
|
||||||
platform_set_drvdata(pdev, s2mps11);
|
platform_set_drvdata(pdev, s2mps11);
|
||||||
|
|
||||||
s2mps11->ramp_delay2 = pdata->buck2_ramp_delay;
|
s2mps11->ramp_delay2 = pdata->buck2_ramp_delay;
|
||||||
|
@ -284,7 +280,7 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev)
|
||||||
ramp_reg |= get_ramp_delay(s2mps11->ramp_delay2) >> 6;
|
ramp_reg |= get_ramp_delay(s2mps11->ramp_delay2) >> 6;
|
||||||
if (s2mps11->buck3_ramp || s2mps11->buck4_ramp)
|
if (s2mps11->buck3_ramp || s2mps11->buck4_ramp)
|
||||||
ramp_reg |= get_ramp_delay(s2mps11->ramp_delay34) >> 4;
|
ramp_reg |= get_ramp_delay(s2mps11->ramp_delay34) >> 4;
|
||||||
sec_reg_update(s2mps11->iodev, S2MPS11_REG_RAMP,
|
sec_reg_update(iodev, S2MPS11_REG_RAMP,
|
||||||
ramp_reg | ramp_enable, 0xff);
|
ramp_reg | ramp_enable, 0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,11 +289,11 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev)
|
||||||
ramp_reg |= get_ramp_delay(s2mps11->ramp_delay16) >> 4;
|
ramp_reg |= get_ramp_delay(s2mps11->ramp_delay16) >> 4;
|
||||||
ramp_reg |= get_ramp_delay(s2mps11->ramp_delay7810) >> 2;
|
ramp_reg |= get_ramp_delay(s2mps11->ramp_delay7810) >> 2;
|
||||||
ramp_reg |= get_ramp_delay(s2mps11->ramp_delay9);
|
ramp_reg |= get_ramp_delay(s2mps11->ramp_delay9);
|
||||||
sec_reg_update(s2mps11->iodev, S2MPS11_REG_RAMP_BUCK, ramp_reg, 0xff);
|
sec_reg_update(iodev, S2MPS11_REG_RAMP_BUCK, ramp_reg, 0xff);
|
||||||
|
|
||||||
for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) {
|
for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) {
|
||||||
|
|
||||||
config.dev = s2mps11->dev;
|
config.dev = &pdev->dev;
|
||||||
config.regmap = iodev->regmap;
|
config.regmap = iodev->regmap;
|
||||||
config.init_data = pdata->regulators[i].initdata;
|
config.init_data = pdata->regulators[i].initdata;
|
||||||
config.driver_data = s2mps11;
|
config.driver_data = s2mps11;
|
||||||
|
@ -305,7 +301,7 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev)
|
||||||
rdev[i] = regulator_register(®ulators[i], &config);
|
rdev[i] = regulator_register(®ulators[i], &config);
|
||||||
if (IS_ERR(rdev[i])) {
|
if (IS_ERR(rdev[i])) {
|
||||||
ret = PTR_ERR(rdev[i]);
|
ret = PTR_ERR(rdev[i]);
|
||||||
dev_err(s2mps11->dev, "regulator init failed for %d\n",
|
dev_err(&pdev->dev, "regulator init failed for %d\n",
|
||||||
i);
|
i);
|
||||||
rdev[i] = NULL;
|
rdev[i] = NULL;
|
||||||
goto err;
|
goto err;
|
||||||
|
|
Loading…
Reference in New Issue