diff options
author | Haojian Zhuang <haojian.zhuang@gmail.com> | 2012-08-08 11:17:28 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-09-11 05:38:17 -0400 |
commit | a70abacb06b884131ec181551a71ef325490f374 (patch) | |
tree | 4372f7751588d3b47a56571e36edfcf9a0fde0a8 /drivers/regulator | |
parent | 894fc8f2c295373e6c73943d8bc2023cc49b9bb0 (diff) |
mfd: 88pm860x: Use REG resource in regulator
Since IORESOURCE_IO is changed to IORESOURCE_REG in 88pm860x driver,
update self-defined IORESOURCE_IO resource to register offset that
is IORESOURCE_REG in regulator driver. And split regulator platform
data array into scattered platform data.
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/88pm8607.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index 0b76372aee72..843c89a15472 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c | |||
@@ -322,12 +322,12 @@ static int __devinit pm8607_regulator_probe(struct platform_device *pdev) | |||
322 | 322 | ||
323 | res = platform_get_resource(pdev, IORESOURCE_REG, 0); | 323 | res = platform_get_resource(pdev, IORESOURCE_REG, 0); |
324 | if (res == NULL) { | 324 | if (res == NULL) { |
325 | dev_err(&pdev->dev, "No I/O resource!\n"); | 325 | dev_err(&pdev->dev, "No REG resource!\n"); |
326 | return -EINVAL; | 326 | return -EINVAL; |
327 | } | 327 | } |
328 | for (i = 0; i < ARRAY_SIZE(pm8607_regulator_info); i++) { | 328 | for (i = 0; i < ARRAY_SIZE(pm8607_regulator_info); i++) { |
329 | info = &pm8607_regulator_info[i]; | 329 | info = &pm8607_regulator_info[i]; |
330 | if (info->desc.id == res->start) | 330 | if (info->desc.vsel_reg == res->start) |
331 | break; | 331 | break; |
332 | } | 332 | } |
333 | if (i == ARRAY_SIZE(pm8607_regulator_info)) { | 333 | if (i == ARRAY_SIZE(pm8607_regulator_info)) { |
@@ -351,7 +351,6 @@ static int __devinit pm8607_regulator_probe(struct platform_device *pdev) | |||
351 | else | 351 | else |
352 | config.regmap = chip->regmap_companion; | 352 | config.regmap = chip->regmap_companion; |
353 | 353 | ||
354 | /* replace driver_data with info */ | ||
355 | info->regulator = regulator_register(&info->desc, &config); | 354 | info->regulator = regulator_register(&info->desc, &config); |
356 | if (IS_ERR(info->regulator)) { | 355 | if (IS_ERR(info->regulator)) { |
357 | dev_err(&pdev->dev, "failed to register regulator %s\n", | 356 | dev_err(&pdev->dev, "failed to register regulator %s\n", |