Skip to content

Commit 0e819b5

Browse files
AxelLinbroonie
authored andcommitted
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: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 2654d36 commit 0e819b5

1 file changed

Lines changed: 5 additions & 14 deletions

File tree

‎drivers/regulator/88pm8607.c‎

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <linux/kernel.h>
1212
#include <linux/init.h>
1313
#include <linux/err.h>
14-
#include <linux/i2c.h>
1514
#include <linux/of.h>
1615
#include <linux/regulator/of_regulator.h>
1716
#include <linux/platform_device.h>
@@ -22,10 +21,6 @@
2221

2322
struct pm8607_regulator_info {
2423
struct regulator_desc desc;
25-
struct pm860x_chip *chip;
26-
struct regulator_dev *regulator;
27-
struct i2c_client *i2c;
28-
struct i2c_client *i2c_8606;
2924

3025
unsigned int *vol_suspend;
3126

@@ -350,6 +345,7 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
350345
struct pm8607_regulator_info *info = NULL;
351346
struct regulator_init_data *pdata = dev_get_platdata(&pdev->dev);
352347
struct regulator_config config = { };
348+
struct regulator_dev *rdev;
353349
struct resource *res;
354350
int i;
355351

@@ -372,13 +368,9 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
372368
/* i is used to check regulator ID */
373369
i = -1;
374370
}
375-
info->i2c = (chip->id == CHIP_PM8607) ? chip->client : chip->companion;
376-
info->i2c_8606 = (chip->id == CHIP_PM8607) ? chip->companion :
377-
chip->client;
378-
info->chip = chip;
379371

380372
/* check DVC ramp slope double */
381-
if ((i == PM8607_ID_BUCK3) && info->chip->buck3_double)
373+
if ((i == PM8607_ID_BUCK3) && chip->buck3_double)
382374
info->slope_double = 1;
383375

384376
config.dev = &pdev->dev;
@@ -393,12 +385,11 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
393385
else
394386
config.regmap = chip->regmap_companion;
395387

396-
info->regulator = devm_regulator_register(&pdev->dev, &info->desc,
397-
&config);
398-
if (IS_ERR(info->regulator)) {
388+
rdev = devm_regulator_register(&pdev->dev, &info->desc, &config);
389+
if (IS_ERR(rdev)) {
399390
dev_err(&pdev->dev, "failed to register regulator %s\n",
400391
info->desc.name);
401-
return PTR_ERR(info->regulator);
392+
return PTR_ERR(rdev);
402393
}
403394

404395
platform_set_drvdata(pdev, info);

0 commit comments

Comments
 (0)