* [PATCH] mfd: stw481x: Remove unused fields from struct stw481x
@ 2015-02-13 5:28 Axel Lin
2015-02-16 9:14 ` Linus Walleij
2015-02-16 11:51 ` Lee Jones
0 siblings, 2 replies; 5+ messages in thread
From: Axel Lin @ 2015-02-13 5:28 UTC (permalink / raw)
To: Lee Jones; +Cc: Linus Walleij, Liam Girdwood, Mark Brown, linux-kernel
The mutex lock is not used at all, remove it.
The *vmmc_regulator is not necessary, use a local variable in
stw481x_vmmc_regulator_probe() instead.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/stw481x-vmmc.c | 8 ++++----
include/linux/mfd/stw481x.h | 4 ----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/regulator/stw481x-vmmc.c b/drivers/regulator/stw481x-vmmc.c
index 89025f5..7d2ae3e 100644
--- a/drivers/regulator/stw481x-vmmc.c
+++ b/drivers/regulator/stw481x-vmmc.c
@@ -56,6 +56,7 @@ static int stw481x_vmmc_regulator_probe(struct platform_device *pdev)
{
struct stw481x *stw481x = dev_get_platdata(&pdev->dev);
struct regulator_config config = { };
+ struct regulator_dev *rdev;
int ret;
/* First disable the external VMMC if it's active */
@@ -75,12 +76,11 @@ static int stw481x_vmmc_regulator_probe(struct platform_device *pdev)
pdev->dev.of_node,
&vmmc_regulator);
- stw481x->vmmc_regulator = devm_regulator_register(&pdev->dev,
- &vmmc_regulator, &config);
- if (IS_ERR(stw481x->vmmc_regulator)) {
+ rdev = devm_regulator_register(&pdev->dev, &vmmc_regulator, &config);
+ if (IS_ERR(rdev)) {
dev_err(&pdev->dev,
"error initializing STw481x VMMC regulator\n");
- return PTR_ERR(stw481x->vmmc_regulator);
+ return PTR_ERR(rdev);
}
dev_info(&pdev->dev, "initialized STw481x VMMC regulator\n");
diff --git a/include/linux/mfd/stw481x.h b/include/linux/mfd/stw481x.h
index eda1215..833074b 100644
--- a/include/linux/mfd/stw481x.h
+++ b/include/linux/mfd/stw481x.h
@@ -41,15 +41,11 @@
/**
* struct stw481x - state holder for the Stw481x drivers
- * @mutex: mutex to serialize I2C accesses
* @i2c_client: corresponding I2C client
- * @regulator: regulator device for regulator children
* @map: regmap handle to access device registers
*/
struct stw481x {
- struct mutex lock;
struct i2c_client *client;
- struct regulator_dev *vmmc_regulator;
struct regmap *map;
};
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd: stw481x: Remove unused fields from struct stw481x
2015-02-13 5:28 [PATCH] mfd: stw481x: Remove unused fields from struct stw481x Axel Lin
@ 2015-02-16 9:14 ` Linus Walleij
2015-02-16 11:51 ` Lee Jones
1 sibling, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2015-02-16 9:14 UTC (permalink / raw)
To: Axel Lin; +Cc: Lee Jones, Liam Girdwood, Mark Brown, linux-kernel
On Fri, Feb 13, 2015 at 6:28 AM, Axel Lin <axel.lin@ingics.com> wrote:
> The mutex lock is not used at all, remove it.
> The *vmmc_regulator is not necessary, use a local variable in
> stw481x_vmmc_regulator_probe() instead.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Thanks a lot Axel!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd: stw481x: Remove unused fields from struct stw481x
2015-02-13 5:28 [PATCH] mfd: stw481x: Remove unused fields from struct stw481x Axel Lin
2015-02-16 9:14 ` Linus Walleij
@ 2015-02-16 11:51 ` Lee Jones
2015-03-17 0:51 ` Axel Lin
1 sibling, 1 reply; 5+ messages in thread
From: Lee Jones @ 2015-02-16 11:51 UTC (permalink / raw)
To: Axel Lin; +Cc: Linus Walleij, Liam Girdwood, Mark Brown, linux-kernel
On Fri, 13 Feb 2015, Axel Lin wrote:
> The mutex lock is not used at all, remove it.
> The *vmmc_regulator is not necessary, use a local variable in
> stw481x_vmmc_regulator_probe() instead.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/regulator/stw481x-vmmc.c | 8 ++++----
> include/linux/mfd/stw481x.h | 4 ----
> 2 files changed, 4 insertions(+), 8 deletions(-)
Acked-by: Lee Jones <lee.jones@linaro.org>
> diff --git a/drivers/regulator/stw481x-vmmc.c b/drivers/regulator/stw481x-vmmc.c
> index 89025f5..7d2ae3e 100644
> --- a/drivers/regulator/stw481x-vmmc.c
> +++ b/drivers/regulator/stw481x-vmmc.c
> @@ -56,6 +56,7 @@ static int stw481x_vmmc_regulator_probe(struct platform_device *pdev)
> {
> struct stw481x *stw481x = dev_get_platdata(&pdev->dev);
> struct regulator_config config = { };
> + struct regulator_dev *rdev;
> int ret;
>
> /* First disable the external VMMC if it's active */
> @@ -75,12 +76,11 @@ static int stw481x_vmmc_regulator_probe(struct platform_device *pdev)
> pdev->dev.of_node,
> &vmmc_regulator);
>
> - stw481x->vmmc_regulator = devm_regulator_register(&pdev->dev,
> - &vmmc_regulator, &config);
> - if (IS_ERR(stw481x->vmmc_regulator)) {
> + rdev = devm_regulator_register(&pdev->dev, &vmmc_regulator, &config);
> + if (IS_ERR(rdev)) {
> dev_err(&pdev->dev,
> "error initializing STw481x VMMC regulator\n");
> - return PTR_ERR(stw481x->vmmc_regulator);
> + return PTR_ERR(rdev);
> }
>
> dev_info(&pdev->dev, "initialized STw481x VMMC regulator\n");
> diff --git a/include/linux/mfd/stw481x.h b/include/linux/mfd/stw481x.h
> index eda1215..833074b 100644
> --- a/include/linux/mfd/stw481x.h
> +++ b/include/linux/mfd/stw481x.h
> @@ -41,15 +41,11 @@
>
> /**
> * struct stw481x - state holder for the Stw481x drivers
> - * @mutex: mutex to serialize I2C accesses
> * @i2c_client: corresponding I2C client
> - * @regulator: regulator device for regulator children
> * @map: regmap handle to access device registers
> */
> struct stw481x {
> - struct mutex lock;
> struct i2c_client *client;
> - struct regulator_dev *vmmc_regulator;
> struct regmap *map;
> };
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd: stw481x: Remove unused fields from struct stw481x
2015-02-16 11:51 ` Lee Jones
@ 2015-03-17 0:51 ` Axel Lin
2015-03-17 13:03 ` Lee Jones
0 siblings, 1 reply; 5+ messages in thread
From: Axel Lin @ 2015-03-17 0:51 UTC (permalink / raw)
To: Lee Jones; +Cc: Linus Walleij, Liam Girdwood, Mark Brown, linux-kernel
2015-02-16 19:51 GMT+08:00 Lee Jones <lee.jones@linaro.org>:
> On Fri, 13 Feb 2015, Axel Lin wrote:
>
>> The mutex lock is not used at all, remove it.
>> The *vmmc_regulator is not necessary, use a local variable in
>> stw481x_vmmc_regulator_probe() instead.
>>
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>> ---
>> drivers/regulator/stw481x-vmmc.c | 8 ++++----
>> include/linux/mfd/stw481x.h | 4 ----
>> 2 files changed, 4 insertions(+), 8 deletions(-)
>
> Acked-by: Lee Jones <lee.jones@linaro.org>
Hi Lee,
I thought you will pick up this patch.
But now I got your ack, I'm not sure what should I do now.
Should I resend the patch?
Regards,
Axel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd: stw481x: Remove unused fields from struct stw481x
2015-03-17 0:51 ` Axel Lin
@ 2015-03-17 13:03 ` Lee Jones
0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2015-03-17 13:03 UTC (permalink / raw)
To: Axel Lin; +Cc: Linus Walleij, Liam Girdwood, Mark Brown, linux-kernel
On Tue, 17 Mar 2015, Axel Lin wrote:
> 2015-02-16 19:51 GMT+08:00 Lee Jones <lee.jones@linaro.org>:
> > On Fri, 13 Feb 2015, Axel Lin wrote:
> >
> >> The mutex lock is not used at all, remove it.
> >> The *vmmc_regulator is not necessary, use a local variable in
> >> stw481x_vmmc_regulator_probe() instead.
> >>
> >> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> >> ---
> >> drivers/regulator/stw481x-vmmc.c | 8 ++++----
> >> include/linux/mfd/stw481x.h | 4 ----
> >> 2 files changed, 4 insertions(+), 8 deletions(-)
> >
> > Acked-by: Lee Jones <lee.jones@linaro.org>
> Hi Lee,
> I thought you will pick up this patch.
> But now I got your ack, I'm not sure what should I do now.
> Should I resend the patch?
I think Mark should pick this up, as the only changes in MFD are in
the header.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-17 13:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13 5:28 [PATCH] mfd: stw481x: Remove unused fields from struct stw481x Axel Lin
2015-02-16 9:14 ` Linus Walleij
2015-02-16 11:51 ` Lee Jones
2015-03-17 0:51 ` Axel Lin
2015-03-17 13:03 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).