* [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container
@ 2014-03-10 8:32 Krzysztof Kozlowski
2014-03-10 8:32 ` [PATCH 2/8] regulator: max77686: Remove regulator_dev array " Krzysztof Kozlowski
` (7 more replies)
0 siblings, 8 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2014-03-10 8:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, linux-kernel; +Cc: Krzysztof Kozlowski
Don't store pointer to regulator_dev returned by
devm_regulator_register() in state container. It isn't used anywhere
outside of max1586_pmic_probe() function.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/regulator/max1586.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c
index e242dd316d36..c2a40a1a9e3e 100644
--- a/drivers/regulator/max1586.c
+++ b/drivers/regulator/max1586.c
@@ -46,8 +46,6 @@ struct max1586_data {
unsigned int v3_curr_sel;
unsigned int v6_curr_sel;
-
- struct regulator_dev *rdev[0];
};
/*
@@ -162,7 +160,6 @@ static struct regulator_desc max1586_reg[] = {
static int max1586_pmic_probe(struct i2c_client *client,
const struct i2c_device_id *i2c_id)
{
- struct regulator_dev **rdev;
struct max1586_platform_data *pdata = dev_get_platdata(&client->dev);
struct regulator_config config = { };
struct max1586_data *max1586;
@@ -186,8 +183,9 @@ static int max1586_pmic_probe(struct i2c_client *client,
max1586->v3_curr_sel = 24; /* 1.3V */
max1586->v6_curr_sel = 0;
- rdev = max1586->rdev;
for (i = 0; i < pdata->num_subdevs && i <= MAX1586_V6; i++) {
+ struct regulator_dev *rdev;
+
id = pdata->subdevs[i].id;
if (!pdata->subdevs[i].platform_data)
continue;
@@ -207,12 +205,12 @@ static int max1586_pmic_probe(struct i2c_client *client,
config.init_data = pdata->subdevs[i].platform_data;
config.driver_data = max1586;
- rdev[i] = devm_regulator_register(&client->dev,
+ rdev = devm_regulator_register(&client->dev,
&max1586_reg[id], &config);
- if (IS_ERR(rdev[i])) {
+ if (IS_ERR(rdev)) {
dev_err(&client->dev, "failed to register %s\n",
max1586_reg[id].name);
- return PTR_ERR(rdev[i]);
+ return PTR_ERR(rdev);
}
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/8] regulator: max77686: Remove regulator_dev array from state container
2014-03-10 8:32 [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Krzysztof Kozlowski
@ 2014-03-10 8:32 ` Krzysztof Kozlowski
2014-03-10 8:32 ` [PATCH 3/8] regulator: max77693: Remove state container as it is not needed Krzysztof Kozlowski
` (6 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2014-03-10 8:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, linux-kernel; +Cc: Krzysztof Kozlowski
Don't store array of regulator_dev returned by devm_regulator_register()
in state container. It isn't used anywhere outside of
max77686_pmic_probe() function.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/regulator/max77686.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c
index ae001ccf26f4..a46e9af21f36 100644
--- a/drivers/regulator/max77686.c
+++ b/drivers/regulator/max77686.c
@@ -65,7 +65,6 @@ enum max77686_ramp_rate {
};
struct max77686_data {
- struct regulator_dev *rdev[MAX77686_REGULATORS];
unsigned int opmode[MAX77686_REGULATORS];
};
@@ -474,16 +473,18 @@ static int max77686_pmic_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, max77686);
for (i = 0; i < MAX77686_REGULATORS; i++) {
+ struct regulator_dev *rdev;
+
config.init_data = pdata->regulators[i].initdata;
config.of_node = pdata->regulators[i].of_node;
max77686->opmode[i] = regulators[i].enable_mask;
- max77686->rdev[i] = devm_regulator_register(&pdev->dev,
+ rdev = devm_regulator_register(&pdev->dev,
®ulators[i], &config);
- if (IS_ERR(max77686->rdev[i])) {
+ if (IS_ERR(rdev)) {
dev_err(&pdev->dev,
"regulator init failed for %d\n", i);
- return PTR_ERR(max77686->rdev[i]);
+ return PTR_ERR(rdev);
}
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/8] regulator: max77693: Remove state container as it is not needed
2014-03-10 8:32 [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Krzysztof Kozlowski
2014-03-10 8:32 ` [PATCH 2/8] regulator: max77686: Remove regulator_dev array " Krzysztof Kozlowski
@ 2014-03-10 8:32 ` Krzysztof Kozlowski
2014-03-10 9:32 ` Mark Brown
2014-03-10 8:32 ` [PATCH 4/8] regulator: max8649: Remove regulator_dev pointer from state container Krzysztof Kozlowski
` (5 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2014-03-10 8:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, linux-kernel; +Cc: Krzysztof Kozlowski
Don't store pointers to regulator_dev returned by
devm_regulator_register() in allocated memory in state container. They
aren't used anywhere outside of max77693_pmic_probe() function.
This change allows removing completely the 'struct max77693_pmic_dev'
state container as none of its fields are used outside of probe.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/regulator/max77693.c | 37 ++++++-------------------------------
1 file changed, 6 insertions(+), 31 deletions(-)
diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c
index 5fb899f461d0..4352924bfb98 100644
--- a/drivers/regulator/max77693.c
+++ b/drivers/regulator/max77693.c
@@ -34,13 +34,6 @@
#define CHGIN_ILIM_STEP_20mA 20000
-struct max77693_pmic_dev {
- struct device *dev;
- struct max77693_dev *iodev;
- int num_regulators;
- struct regulator_dev **rdev;
-};
-
/* CHARGER regulator ops */
/* CHARGER regulator uses two bits for enabling */
static int max77693_chg_is_enabled(struct regulator_dev *rdev)
@@ -229,7 +222,6 @@ static int max77693_pmic_init_rdata(struct device *dev,
static int max77693_pmic_probe(struct platform_device *pdev)
{
struct max77693_dev *iodev = dev_get_drvdata(pdev->dev.parent);
- struct max77693_pmic_dev *max77693_pmic;
struct max77693_regulator_data *rdata = NULL;
int num_rdata, i;
struct regulator_config config;
@@ -240,39 +232,22 @@ static int max77693_pmic_probe(struct platform_device *pdev)
return -ENODEV;
}
- max77693_pmic = devm_kzalloc(&pdev->dev,
- sizeof(struct max77693_pmic_dev),
- GFP_KERNEL);
- if (!max77693_pmic)
- return -ENOMEM;
-
- max77693_pmic->rdev = devm_kzalloc(&pdev->dev,
- sizeof(struct regulator_dev *) * num_rdata,
- GFP_KERNEL);
- if (!max77693_pmic->rdev)
- return -ENOMEM;
-
- max77693_pmic->dev = &pdev->dev;
- max77693_pmic->iodev = iodev;
- max77693_pmic->num_regulators = num_rdata;
-
config.dev = &pdev->dev;
config.regmap = iodev->regmap;
- config.driver_data = max77693_pmic;
- platform_set_drvdata(pdev, max77693_pmic);
- for (i = 0; i < max77693_pmic->num_regulators; i++) {
+ for (i = 0; i < num_rdata; i++) {
int id = rdata[i].id;
+ struct regulator_dev *rdev;
config.init_data = rdata[i].initdata;
config.of_node = rdata[i].of_node;
- max77693_pmic->rdev[i] = devm_regulator_register(&pdev->dev,
+ rdev = devm_regulator_register(&pdev->dev,
®ulators[id], &config);
- if (IS_ERR(max77693_pmic->rdev[i])) {
- dev_err(max77693_pmic->dev,
+ if (IS_ERR(rdev)) {
+ dev_err(&pdev->dev,
"Failed to initialize regulator-%d\n", id);
- return PTR_ERR(max77693_pmic->rdev[i]);
+ return PTR_ERR(rdev);
}
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/8] regulator: max8649: Remove regulator_dev pointer from state container
2014-03-10 8:32 [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Krzysztof Kozlowski
2014-03-10 8:32 ` [PATCH 2/8] regulator: max77686: Remove regulator_dev array " Krzysztof Kozlowski
2014-03-10 8:32 ` [PATCH 3/8] regulator: max77693: Remove state container as it is not needed Krzysztof Kozlowski
@ 2014-03-10 8:32 ` Krzysztof Kozlowski
2014-03-10 9:33 ` Mark Brown
2014-03-10 8:32 ` [PATCH 5/8] regulator: max8907: Remove regulator_dev array " Krzysztof Kozlowski
` (4 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2014-03-10 8:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, linux-kernel; +Cc: Krzysztof Kozlowski
Don't store pointer to regulator_dev returned by
evm_regulator_register() an state container. It isn't used anywhere
outside of max8649_regulator_probe() function.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/regulator/max8649.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
index 7f049c92ee52..3172da847d24 100644
--- a/drivers/regulator/max8649.c
+++ b/drivers/regulator/max8649.c
@@ -49,7 +49,6 @@
#define MAX8649_RAMP_DOWN (1 << 1)
struct max8649_regulator_info {
- struct regulator_dev *regulator;
struct device *dev;
struct regmap *regmap;
@@ -154,6 +153,7 @@ static int max8649_regulator_probe(struct i2c_client *client,
{
struct max8649_platform_data *pdata = dev_get_platdata(&client->dev);
struct max8649_regulator_info *info = NULL;
+ struct regulator_dev *regulator;
struct regulator_config config = { };
unsigned int val;
unsigned char data;
@@ -234,12 +234,12 @@ static int max8649_regulator_probe(struct i2c_client *client,
config.driver_data = info;
config.regmap = info->regmap;
- info->regulator = devm_regulator_register(&client->dev, &dcdc_desc,
+ regulator = devm_regulator_register(&client->dev, &dcdc_desc,
&config);
- if (IS_ERR(info->regulator)) {
+ if (IS_ERR(regulator)) {
dev_err(info->dev, "failed to register regulator %s\n",
dcdc_desc.name);
- return PTR_ERR(info->regulator);
+ return PTR_ERR(regulator);
}
return 0;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 5/8] regulator: max8907: Remove regulator_dev array from state container
2014-03-10 8:32 [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Krzysztof Kozlowski
` (2 preceding siblings ...)
2014-03-10 8:32 ` [PATCH 4/8] regulator: max8649: Remove regulator_dev pointer from state container Krzysztof Kozlowski
@ 2014-03-10 8:32 ` Krzysztof Kozlowski
2014-03-10 9:35 ` Mark Brown
2014-03-10 8:32 ` [PATCH 6/8] regulator: max8925: Remove unused state container fields Krzysztof Kozlowski
` (3 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2014-03-10 8:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, linux-kernel; +Cc: Krzysztof Kozlowski
Don't store array of regulator_dev returned by devm_regulator_register()
in state container. It isn't used anywhere outside of
max8907_regulator_probe() function.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/regulator/max8907-regulator.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c
index 0c5fe6c6ac26..58959ee0249b 100644
--- a/drivers/regulator/max8907-regulator.c
+++ b/drivers/regulator/max8907-regulator.c
@@ -34,7 +34,6 @@
struct max8907_regulator {
struct regulator_desc desc[MAX8907_NUM_REGULATORS];
- struct regulator_dev *rdev[MAX8907_NUM_REGULATORS];
};
#define REG_MBATT() \
@@ -311,6 +310,8 @@ static int max8907_regulator_probe(struct platform_device *pdev)
}
for (i = 0; i < MAX8907_NUM_REGULATORS; i++) {
+ struct regulator_dev *rdev;
+
config.dev = pdev->dev.parent;
if (pdata)
idata = pdata->init_data[i];
@@ -350,13 +351,13 @@ static int max8907_regulator_probe(struct platform_device *pdev)
pmic->desc[i].ops = &max8907_out5v_hwctl_ops;
}
- pmic->rdev[i] = devm_regulator_register(&pdev->dev,
+ rdev = devm_regulator_register(&pdev->dev,
&pmic->desc[i], &config);
- if (IS_ERR(pmic->rdev[i])) {
+ if (IS_ERR(rdev)) {
dev_err(&pdev->dev,
"failed to register %s regulator\n",
pmic->desc[i].name);
- return PTR_ERR(pmic->rdev[i]);
+ return PTR_ERR(rdev);
}
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 6/8] regulator: max8925: Remove unused state container fields
2014-03-10 8:32 [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Krzysztof Kozlowski
` (3 preceding siblings ...)
2014-03-10 8:32 ` [PATCH 5/8] regulator: max8907: Remove regulator_dev array " Krzysztof Kozlowski
@ 2014-03-10 8:32 ` Krzysztof Kozlowski
2014-03-10 9:35 ` Mark Brown
2014-03-10 8:32 ` [PATCH 7/8] regulator: max8952: Use managed regulator registration Krzysztof Kozlowski
` (2 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2014-03-10 8:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, linux-kernel; +Cc: Krzysztof Kozlowski
Remove fields from 'struct max8907_regulator' which are not used
anywhere in the driver.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/regulator/max8925-regulator.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c
index 759510789e71..17c16266c03f 100644
--- a/drivers/regulator/max8925-regulator.c
+++ b/drivers/regulator/max8925-regulator.c
@@ -36,9 +36,7 @@
struct max8925_regulator_info {
struct regulator_desc desc;
- struct regulator_dev *regulator;
struct i2c_client *i2c;
- struct max8925_chip *chip;
int vol_reg;
int enable_reg;
@@ -303,7 +301,6 @@ static int max8925_regulator_probe(struct platform_device *pdev)
return -EINVAL;
}
ri->i2c = chip->i2c;
- ri->chip = chip;
config.dev = &pdev->dev;
config.driver_data = ri;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 7/8] regulator: max8952: Use managed regulator registration
2014-03-10 8:32 [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Krzysztof Kozlowski
` (4 preceding siblings ...)
2014-03-10 8:32 ` [PATCH 6/8] regulator: max8925: Remove unused state container fields Krzysztof Kozlowski
@ 2014-03-10 8:32 ` Krzysztof Kozlowski
2014-03-10 9:36 ` Mark Brown
2014-03-10 8:32 ` [PATCH 8/8] regulator: max8973: Remove unused field from 'struct max8973_chip' Krzysztof Kozlowski
2014-03-10 9:23 ` [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Mark Brown
7 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2014-03-10 8:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, linux-kernel; +Cc: Krzysztof Kozlowski
Use managed devm_regulator_register to simplify the driver probe and
driver remove functions. This allows removing from state container the
pointer to regulator_dev returned on registering the regulator.
Patch also removes from state container pointer to 'struct device' as it
is not used anywhere outside of max8952_pmic_probe() function.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/regulator/max8952.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c
index 788e5ae2af1b..465f21f9d6ee 100644
--- a/drivers/regulator/max8952.c
+++ b/drivers/regulator/max8952.c
@@ -48,9 +48,7 @@ enum {
struct max8952_data {
struct i2c_client *client;
- struct device *dev;
struct max8952_platform_data *pdata;
- struct regulator_dev *rdev;
bool vid0;
bool vid1;
@@ -199,6 +197,7 @@ static int max8952_pmic_probe(struct i2c_client *client,
struct max8952_platform_data *pdata = dev_get_platdata(&client->dev);
struct regulator_config config = { };
struct max8952_data *max8952;
+ struct regulator_dev *rdev;
int ret = 0, err = 0;
@@ -219,10 +218,9 @@ static int max8952_pmic_probe(struct i2c_client *client,
return -ENOMEM;
max8952->client = client;
- max8952->dev = &client->dev;
max8952->pdata = pdata;
- config.dev = max8952->dev;
+ config.dev = &client->dev;
config.init_data = pdata->reg_data;
config.driver_data = max8952;
config.of_node = client->dev.of_node;
@@ -231,11 +229,11 @@ static int max8952_pmic_probe(struct i2c_client *client,
if (pdata->reg_data->constraints.boot_on)
config.ena_gpio_flags |= GPIOF_OUT_INIT_HIGH;
- max8952->rdev = regulator_register(®ulator, &config);
+ rdev = devm_regulator_register(&client->dev, ®ulator, &config);
- if (IS_ERR(max8952->rdev)) {
- ret = PTR_ERR(max8952->rdev);
- dev_err(max8952->dev, "regulator init failed (%d)\n", ret);
+ if (IS_ERR(rdev)) {
+ ret = PTR_ERR(rdev);
+ dev_err(&client->dev, "regulator init failed (%d)\n", ret);
return ret;
}
@@ -263,7 +261,7 @@ static int max8952_pmic_probe(struct i2c_client *client,
err = 3;
if (err) {
- dev_warn(max8952->dev, "VID0/1 gpio invalid: "
+ dev_warn(&client->dev, "VID0/1 gpio invalid: "
"DVS not available.\n");
max8952->vid0 = 0;
max8952->vid1 = 0;
@@ -274,7 +272,7 @@ static int max8952_pmic_probe(struct i2c_client *client,
/* Disable Pulldown of EN only */
max8952_write_reg(max8952, MAX8952_REG_CONTROL, 0x60);
- dev_err(max8952->dev, "DVS modes disabled because VID0 and VID1"
+ dev_err(&client->dev, "DVS modes disabled because VID0 and VID1"
" do not have proper controls.\n");
} else {
/*
@@ -321,9 +319,6 @@ static int max8952_pmic_remove(struct i2c_client *client)
{
struct max8952_data *max8952 = i2c_get_clientdata(client);
struct max8952_platform_data *pdata = max8952->pdata;
- struct regulator_dev *rdev = max8952->rdev;
-
- regulator_unregister(rdev);
gpio_free(pdata->gpio_vid0);
gpio_free(pdata->gpio_vid1);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 8/8] regulator: max8973: Remove unused field from 'struct max8973_chip'
2014-03-10 8:32 [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Krzysztof Kozlowski
` (5 preceding siblings ...)
2014-03-10 8:32 ` [PATCH 7/8] regulator: max8952: Use managed regulator registration Krzysztof Kozlowski
@ 2014-03-10 8:32 ` Krzysztof Kozlowski
2014-03-10 9:36 ` Mark Brown
2014-03-10 9:23 ` [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Mark Brown
7 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2014-03-10 8:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, linux-kernel; +Cc: Krzysztof Kozlowski
The 'struct regulator_dev *rdev' of 'struct max8973_chip' isn't used
anywhere in the driver so it can be removed safely.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/regulator/max8973-regulator.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c
index 892aa1e5b96c..552fb6d1850c 100644
--- a/drivers/regulator/max8973-regulator.c
+++ b/drivers/regulator/max8973-regulator.c
@@ -93,7 +93,6 @@
struct max8973_chip {
struct device *dev;
struct regulator_desc desc;
- struct regulator_dev *rdev;
struct regmap *regmap;
bool enable_external_control;
int dvs_gpio;
@@ -474,7 +473,6 @@ static int max8973_probe(struct i2c_client *client,
return ret;
}
- max->rdev = rdev;
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container
2014-03-10 8:32 [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Krzysztof Kozlowski
` (6 preceding siblings ...)
2014-03-10 8:32 ` [PATCH 8/8] regulator: max8973: Remove unused field from 'struct max8973_chip' Krzysztof Kozlowski
@ 2014-03-10 9:23 ` Mark Brown
2014-03-10 9:47 ` Krzysztof Kozlowski
7 siblings, 1 reply; 16+ messages in thread
From: Mark Brown @ 2014-03-10 9:23 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 253 bytes --]
On Mon, Mar 10, 2014 at 09:32:44AM +0100, Krzysztof Kozlowski wrote:
> Don't store pointer to regulator_dev returned by
> devm_regulator_register() in state container. It isn't used anywhere
> outside of max1586_pmic_probe() function.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/8] regulator: max77693: Remove state container as it is not needed
2014-03-10 8:32 ` [PATCH 3/8] regulator: max77693: Remove state container as it is not needed Krzysztof Kozlowski
@ 2014-03-10 9:32 ` Mark Brown
0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2014-03-10 9:32 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 278 bytes --]
On Mon, Mar 10, 2014 at 09:32:46AM +0100, Krzysztof Kozlowski wrote:
> Don't store pointers to regulator_dev returned by
> devm_regulator_register() in allocated memory in state container. They
> aren't used anywhere outside of max77693_pmic_probe() function.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 4/8] regulator: max8649: Remove regulator_dev pointer from state container
2014-03-10 8:32 ` [PATCH 4/8] regulator: max8649: Remove regulator_dev pointer from state container Krzysztof Kozlowski
@ 2014-03-10 9:33 ` Mark Brown
0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2014-03-10 9:33 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 257 bytes --]
On Mon, Mar 10, 2014 at 09:32:47AM +0100, Krzysztof Kozlowski wrote:
> Don't store pointer to regulator_dev returned by
> evm_regulator_register() an state container. It isn't used anywhere
> outside of max8649_regulator_probe() function.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 5/8] regulator: max8907: Remove regulator_dev array from state container
2014-03-10 8:32 ` [PATCH 5/8] regulator: max8907: Remove regulator_dev array " Krzysztof Kozlowski
@ 2014-03-10 9:35 ` Mark Brown
0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2014-03-10 9:35 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 256 bytes --]
On Mon, Mar 10, 2014 at 09:32:48AM +0100, Krzysztof Kozlowski wrote:
> Don't store array of regulator_dev returned by devm_regulator_register()
> in state container. It isn't used anywhere outside of
> max8907_regulator_probe() function.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 6/8] regulator: max8925: Remove unused state container fields
2014-03-10 8:32 ` [PATCH 6/8] regulator: max8925: Remove unused state container fields Krzysztof Kozlowski
@ 2014-03-10 9:35 ` Mark Brown
0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2014-03-10 9:35 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 200 bytes --]
On Mon, Mar 10, 2014 at 09:32:49AM +0100, Krzysztof Kozlowski wrote:
> Remove fields from 'struct max8907_regulator' which are not used
> anywhere in the driver.
Applied with a fixed commit message.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 7/8] regulator: max8952: Use managed regulator registration
2014-03-10 8:32 ` [PATCH 7/8] regulator: max8952: Use managed regulator registration Krzysztof Kozlowski
@ 2014-03-10 9:36 ` Mark Brown
0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2014-03-10 9:36 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 297 bytes --]
On Mon, Mar 10, 2014 at 09:32:50AM +0100, Krzysztof Kozlowski wrote:
> Use managed devm_regulator_register to simplify the driver probe and
> driver remove functions. This allows removing from state container the
> pointer to regulator_dev returned on registering the regulator.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 8/8] regulator: max8973: Remove unused field from 'struct max8973_chip'
2014-03-10 8:32 ` [PATCH 8/8] regulator: max8973: Remove unused field from 'struct max8973_chip' Krzysztof Kozlowski
@ 2014-03-10 9:36 ` Mark Brown
0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2014-03-10 9:36 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 213 bytes --]
On Mon, Mar 10, 2014 at 09:32:51AM +0100, Krzysztof Kozlowski wrote:
> The 'struct regulator_dev *rdev' of 'struct max8973_chip' isn't used
> anywhere in the driver so it can be removed safely.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container
2014-03-10 9:23 ` [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Mark Brown
@ 2014-03-10 9:47 ` Krzysztof Kozlowski
0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2014-03-10 9:47 UTC (permalink / raw)
To: Mark Brown; +Cc: Liam Girdwood, linux-kernel
On Mon, 2014-03-10 at 09:23 +0000, Mark Brown wrote:
> On Mon, Mar 10, 2014 at 09:32:44AM +0100, Krzysztof Kozlowski wrote:
> > Don't store pointer to regulator_dev returned by
> > devm_regulator_register() in state container. It isn't used anywhere
> > outside of max1586_pmic_probe() function.
>
> Applied, thanks.
Thanks! However I missed one cleanup related to it, so please apply also
next patch (they could be squashed if you want to).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2014-03-10 9:47 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-10 8:32 [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Krzysztof Kozlowski
2014-03-10 8:32 ` [PATCH 2/8] regulator: max77686: Remove regulator_dev array " Krzysztof Kozlowski
2014-03-10 8:32 ` [PATCH 3/8] regulator: max77693: Remove state container as it is not needed Krzysztof Kozlowski
2014-03-10 9:32 ` Mark Brown
2014-03-10 8:32 ` [PATCH 4/8] regulator: max8649: Remove regulator_dev pointer from state container Krzysztof Kozlowski
2014-03-10 9:33 ` Mark Brown
2014-03-10 8:32 ` [PATCH 5/8] regulator: max8907: Remove regulator_dev array " Krzysztof Kozlowski
2014-03-10 9:35 ` Mark Brown
2014-03-10 8:32 ` [PATCH 6/8] regulator: max8925: Remove unused state container fields Krzysztof Kozlowski
2014-03-10 9:35 ` Mark Brown
2014-03-10 8:32 ` [PATCH 7/8] regulator: max8952: Use managed regulator registration Krzysztof Kozlowski
2014-03-10 9:36 ` Mark Brown
2014-03-10 8:32 ` [PATCH 8/8] regulator: max8973: Remove unused field from 'struct max8973_chip' Krzysztof Kozlowski
2014-03-10 9:36 ` Mark Brown
2014-03-10 9:23 ` [PATCH 1/8] regulator: max1586: Remove regulator_dev pointer from state container Mark Brown
2014-03-10 9:47 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox