From: Sascha Hauer <s.hauer@pengutronix.de>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] mc13783-regulator: fix vaild voltage range checking for mc13783_fixed_regulator_set_voltage
Date: Thu, 6 May 2010 08:41:35 +0200 [thread overview]
Message-ID: <20100506064135.GM31199@pengutronix.de> (raw)
In-Reply-To: <1273114469.24703.3.camel@mola>
On Thu, May 06, 2010 at 10:54:29AM +0800, Axel Lin wrote:
> In the case of "min_uV == max_uV == mc13783_regulators[id].voltages[0]",
> mc13783_fixed_regulator_set_voltage should return 0 instead of -EINVAL.
>
> This patch also adds a missing ">" character for MODULE_AUTHOR, a
> trivial fix.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/regulator/mc13783-regulator.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/regulator/mc13783-regulator.c
> b/drivers/regulator/mc13783-regulator.c
> index ad036dd..4597d50 100644
> --- a/drivers/regulator/mc13783-regulator.c
> +++ b/drivers/regulator/mc13783-regulator.c
> @@ -440,8 +440,8 @@ static int
> mc13783_fixed_regulator_set_voltage(struct regulator_dev *rdev,
> dev_dbg(rdev_get_dev(rdev), "%s id: %d min_uV: %d max_uV: %d\n",
> __func__, id, min_uV, max_uV);
>
> - if (min_uV > mc13783_regulators[id].voltages[0] &&
> - max_uV < mc13783_regulators[id].voltages[0])
> + if (min_uV >= mc13783_regulators[id].voltages[0] &&
> + max_uV <= mc13783_regulators[id].voltages[0])
> return 0;
> else
> return -EINVAL;
> @@ -649,6 +649,6 @@ static void __exit mc13783_regulator_exit(void)
> module_exit(mc13783_regulator_exit);
>
> MODULE_LICENSE("GPL v2");
> -MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de");
> +MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
> MODULE_DESCRIPTION("Regulator Driver for Freescale MC13783 PMIC");
> MODULE_ALIAS("platform:mc13783-regulator");
> --
> 1.5.4.3
>
>
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2010-05-06 6:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 2:54 [PATCH] mc13783-regulator: fix vaild voltage range checking for mc13783_fixed_regulator_set_voltage Axel Lin
2010-05-06 6:41 ` Sascha Hauer [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=20100506064135.GM31199@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=axel.lin@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
/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