regulator: act8865: Remove redundant dev lookups
[linux-2.6-block.git] / drivers / regulator / act8865-regulator.c
index f8d4cd3d139738ca6e46b109bb6f810aeccec146..89f856f257f7ffe97b25c54c742206ccadf9a1c7 100644 (file)
@@ -218,7 +218,7 @@ static const struct regulator_desc act8600_regulators[] = {
                .ops = &act8865_ldo_ops,
                .type = REGULATOR_VOLTAGE,
                .n_voltages = 1,
-               .fixed_uV = 1800000,
+               .fixed_uV = 3300000,
                .enable_reg = ACT8600_LDO910_CTRL,
                .enable_mask = ACT8865_ENA,
                .owner = THIS_MODULE,
@@ -369,7 +369,7 @@ static int act8865_pdata_from_dt(struct device *dev,
        for (i = 0; i < num_matches; i++) {
                regulator->id = i;
                regulator->name = matches[i].name;
-               regulator->platform_data = matches[i].init_data;
+               regulator->init_data = matches[i].init_data;
                of_node[i] = matches[i].of_node;
                regulator++;
        }
@@ -396,7 +396,7 @@ static struct regulator_init_data
 
        for (i = 0; i < pdata->num_regulators; i++) {
                if (pdata->regulators[i].id == id)
-                       return pdata->regulators[i].platform_data;
+                       return pdata->regulators[i].init_data;
        }
 
        return NULL;
@@ -415,7 +415,7 @@ static void act8865_power_off(void)
 static int act8865_pmic_probe(struct i2c_client *client,
                              const struct i2c_device_id *i2c_id)
 {
-       static const struct regulator_desc *regulators;
+       const struct regulator_desc *regulators;
        struct act8865_platform_data pdata_of, *pdata;
        struct device *dev = &client->dev;
        struct device_node **of_node;
@@ -498,8 +498,7 @@ static int act8865_pmic_probe(struct i2c_client *client,
        act8865->regmap = devm_regmap_init_i2c(client, &act8865_regmap_config);
        if (IS_ERR(act8865->regmap)) {
                ret = PTR_ERR(act8865->regmap);
-               dev_err(&client->dev, "Failed to allocate register map: %d\n",
-                       ret);
+               dev_err(dev, "Failed to allocate register map: %d\n", ret);
                return ret;
        }
 
@@ -526,7 +525,7 @@ static int act8865_pmic_probe(struct i2c_client *client,
                config.driver_data = act8865;
                config.regmap = act8865->regmap;
 
-               rdev = devm_regulator_register(&client->dev, desc, &config);
+               rdev = devm_regulator_register(dev, desc, &config);
                if (IS_ERR(rdev)) {
                        dev_err(dev, "failed to register %s\n", desc->name);
                        return PTR_ERR(rdev);