summaryrefslogtreecommitdiff
path: root/drivers/regulator/88pm8607.c
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@gmail.com>2012-08-08 19:17:28 +0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-09-11 13:38:17 +0400
commita70abacb06b884131ec181551a71ef325490f374 (patch)
tree4372f7751588d3b47a56571e36edfcf9a0fde0a8 /drivers/regulator/88pm8607.c
parent894fc8f2c295373e6c73943d8bc2023cc49b9bb0 (diff)
downloadlinux-a70abacb06b884131ec181551a71ef325490f374.tar.xz
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/88pm8607.c')
-rw-r--r--drivers/regulator/88pm8607.c5
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)
res = platform_get_resource(pdev, IORESOURCE_REG, 0);
if (res == NULL) {
- dev_err(&pdev->dev, "No I/O resource!\n");
+ dev_err(&pdev->dev, "No REG resource!\n");
return -EINVAL;
}
for (i = 0; i < ARRAY_SIZE(pm8607_regulator_info); i++) {
info = &pm8607_regulator_info[i];
- if (info->desc.id == res->start)
+ if (info->desc.vsel_reg == res->start)
break;
}
if (i == ARRAY_SIZE(pm8607_regulator_info)) {
@@ -351,7 +351,6 @@ static int __devinit pm8607_regulator_probe(struct platform_device *pdev)
else
config.regmap = chip->regmap_companion;
- /* replace driver_data with info */
info->regulator = regulator_register(&info->desc, &config);
if (IS_ERR(info->regulator)) {
dev_err(&pdev->dev, "failed to register regulator %s\n",