From: Liam Girdwood <lrg@kernel.org>
To: Tushar Behera <tushar.behera@linaro.org>
Cc: linux-kernel@vger.kernel.org, linaro-dev@lists.linaro.org,
patches@linaro.org, lrg@ti.com,
broonie@opensource.wolfsonmicro.com,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH] regulator: MAX8997: Fix for divide by zero error
Date: Mon, 04 Jul 2011 17:05:50 +0100 [thread overview]
Message-ID: <1309795550.3272.7.camel@odin> (raw)
In-Reply-To: <1308627539-8980-1-git-send-email-tushar.behera@linaro.org>
On Tue, 2011-06-21 at 09:08 +0530, Tushar Behera wrote:
> Currently, ramp_delay variable is used uninitialzed in
> max8997_set_voltage_ldobuck which gets called through
> regulator_register calls.
>
> To fix the problem, in max8997_pmic_probe, ramp_delay initialization
> code is moved before calls to regulator_register.
>
> Cc: Liam Girdwood <lrg@ti.com>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> ---
> drivers/regulator/max8997.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c
> index 10d5a1d..0fc7b8c 100644
> --- a/drivers/regulator/max8997.c
> +++ b/drivers/regulator/max8997.c
> @@ -1124,6 +1124,10 @@ static __devinit int max8997_pmic_probe(struct platform_device *pdev)
> 0x3f);
> }
>
> + /* Misc Settings */
> + max8997->ramp_delay = 10; /* set 10mV/us, which is the default */
> + max8997_write_reg(i2c, MAX8997_REG_BUCKRAMP, (0xf << 4) | 0x9);
> +
> for (i = 0; i < pdata->num_regulators; i++) {
> const struct voltage_map_desc *desc;
> int id = pdata->regulators[i].id;
> @@ -1148,10 +1152,6 @@ static __devinit int max8997_pmic_probe(struct platform_device *pdev)
> }
> }
>
> - /* Misc Settings */
> - max8997->ramp_delay = 10; /* set 10mV/us, which is the default */
> - max8997_write_reg(i2c, MAX8997_REG_BUCKRAMP, (0xf << 4) | 0x9);
> -
> return 0;
> err:
> for (i = 0; i < max8997->num_regulators; i++)
Applied.
Thanks
Liam
next prev parent reply other threads:[~2011-07-04 16:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 3:38 [PATCH] regulator: MAX8997: Fix for divide by zero error Tushar Behera
2011-06-21 10:08 ` Mark Brown
2011-07-04 16:05 ` Liam Girdwood [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-06-22 2:48 함명주
2011-06-22 3:22 ` Tushar Behera
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=1309795550.3272.7.camel@odin \
--to=lrg@kernel.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=kyungmin.park@samsung.com \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=myungjoo.ham@samsung.com \
--cc=patches@linaro.org \
--cc=sameo@linux.intel.com \
--cc=tushar.behera@linaro.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