Commit 0e819b51 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: 88pm8607: Remove unused fields from struct pm8607_regulator_info

The *i2c and *i2c_8606 are no longer used since this driver was converted
to use regmap helpers. The *chip and *regulator are not really required.
So remove these unused fields.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2654d368
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/i2c.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/regulator/of_regulator.h> #include <linux/regulator/of_regulator.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
...@@ -22,10 +21,6 @@ ...@@ -22,10 +21,6 @@
struct pm8607_regulator_info { struct pm8607_regulator_info {
struct regulator_desc desc; struct regulator_desc desc;
struct pm860x_chip *chip;
struct regulator_dev *regulator;
struct i2c_client *i2c;
struct i2c_client *i2c_8606;
unsigned int *vol_suspend; unsigned int *vol_suspend;
...@@ -350,6 +345,7 @@ static int pm8607_regulator_probe(struct platform_device *pdev) ...@@ -350,6 +345,7 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
struct pm8607_regulator_info *info = NULL; struct pm8607_regulator_info *info = NULL;
struct regulator_init_data *pdata = dev_get_platdata(&pdev->dev); struct regulator_init_data *pdata = dev_get_platdata(&pdev->dev);
struct regulator_config config = { }; struct regulator_config config = { };
struct regulator_dev *rdev;
struct resource *res; struct resource *res;
int i; int i;
...@@ -372,13 +368,9 @@ static int pm8607_regulator_probe(struct platform_device *pdev) ...@@ -372,13 +368,9 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
/* i is used to check regulator ID */ /* i is used to check regulator ID */
i = -1; i = -1;
} }
info->i2c = (chip->id == CHIP_PM8607) ? chip->client : chip->companion;
info->i2c_8606 = (chip->id == CHIP_PM8607) ? chip->companion :
chip->client;
info->chip = chip;
/* check DVC ramp slope double */ /* check DVC ramp slope double */
if ((i == PM8607_ID_BUCK3) && info->chip->buck3_double) if ((i == PM8607_ID_BUCK3) && chip->buck3_double)
info->slope_double = 1; info->slope_double = 1;
config.dev = &pdev->dev; config.dev = &pdev->dev;
...@@ -393,12 +385,11 @@ static int pm8607_regulator_probe(struct platform_device *pdev) ...@@ -393,12 +385,11 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
else else
config.regmap = chip->regmap_companion; config.regmap = chip->regmap_companion;
info->regulator = devm_regulator_register(&pdev->dev, &info->desc, rdev = devm_regulator_register(&pdev->dev, &info->desc, &config);
&config); if (IS_ERR(rdev)) {
if (IS_ERR(info->regulator)) {
dev_err(&pdev->dev, "failed to register regulator %s\n", dev_err(&pdev->dev, "failed to register regulator %s\n",
info->desc.name); info->desc.name);
return PTR_ERR(info->regulator); return PTR_ERR(rdev);
} }
platform_set_drvdata(pdev, info); platform_set_drvdata(pdev, info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment