All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Axel Lin <axel.lin@ingics.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mfd: stw481x: Remove unused fields from struct stw481x
Date: Mon, 16 Feb 2015 11:51:27 +0000	[thread overview]
Message-ID: <20150216115127.GA14545@x1> (raw)
In-Reply-To: <1423805332.20498.2.camel@phoenix>

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

  parent reply	other threads:[~2015-02-16 11:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-03-17  0:51   ` Axel Lin
2015-03-17 13:03     ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150216115127.GA14545@x1 \
    --to=lee.jones@linaro.org \
    --cc=axel.lin@ingics.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.