From a70abacb06b884131ec181551a71ef325490f374 Mon Sep 17 00:00:00 2001 From: Haojian Zhuang Date: Wed, 8 Aug 2012 23:17:28 +0800 Subject: 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 Signed-off-by: Samuel Ortiz --- drivers/regulator/88pm8607.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/regulator') 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", -- cgit v1.2.3