public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
To: Axel Lin <axel.lin@ingics.com>
Cc: Mark Brown <broonie@kernel.org>, Angus Ainslie <angus@akkea.ca>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: bd718x7: Use rdev_get_id() to get regulator id
Date: Mon, 8 Apr 2019 13:42:19 +0300	[thread overview]
Message-ID: <20190408104219.GA17594@localhost.localdomain> (raw)
In-Reply-To: <20190407090302.10918-1-axel.lin@ingics.com>

On Sun, Apr 07, 2019 at 05:03:02PM +0800, Axel Lin wrote:
> Use rdev_get_id() instead of directly access rdev->desc->id.
> While at it also remove unneeded init for ramp_value variable.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/regulator/bd718x7-regulator.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/regulator/bd718x7-regulator.c b/drivers/regulator/bd718x7-regulator.c
> index b2191be49670..fde4264da6ff 100644
> --- a/drivers/regulator/bd718x7-regulator.c
> +++ b/drivers/regulator/bd718x7-regulator.c
> @@ -27,8 +27,8 @@
>  static int bd718xx_buck1234_set_ramp_delay(struct regulator_dev *rdev,
>  					   int ramp_delay)
>  {
> -	int id = rdev->desc->id;
> -	unsigned int ramp_value = BUCK_RAMPRATE_10P00MV;
> +	int id = rdev_get_id(rdev);
> +	unsigned int ramp_value;
>  
>  	dev_dbg(&rdev->dev, "Buck[%d] Set Ramp = %d\n", id + 1,
>  		ramp_delay);
> -- 
> 2.17.1
> 
Acked-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>


      reply	other threads:[~2019-04-08 10:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-07  9:03 [PATCH] regulator: bd718x7: Use rdev_get_id() to get regulator id Axel Lin
2019-04-08 10:42 ` Matti Vaittinen [this message]

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=20190408104219.GA17594@localhost.localdomain \
    --to=matti.vaittinen@fi.rohmeurope.com \
    --cc=angus@akkea.ca \
    --cc=axel.lin@ingics.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox