From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Ashish Jangam <ashish.jangam@kpitcummins.com>
Cc: linaro-dev@lists.linaro.org, lrg@slimlogic.co.uk,
linux-kernel@vger.kernel.org, Dajun <dajun.chen@diasemi.com>,
paul.liu@linaro.org
Subject: Re: [Patch 06/06] Regulator: DA9052/53 Regulator support v5
Date: Thu, 15 Dec 2011 02:02:45 +0800 [thread overview]
Message-ID: <20111214180243.GA19898@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1323440300.23171.74.camel@dhruva>
On Fri, Dec 09, 2011 at 07:48:20PM +0530, Ashish Jangam wrote:
> The Dialog PMIC has below featured regulators:-
> DA9052-BC - 4 DVS Buck converters 0.5V - 3.6V upto 1Amp.
> DA9053-AA/BX - 4 DVS Buck converters 0.5V - 2.5V upto 3Amp.
> DA9052/53 - 10 Programmable LDO's High PSSR, 1% accuracy.
Applied but there are some small issues - please send incremental
patches fixing these.
> + if (chip_id == DA9052) {
> + for (i = 0; i < ARRAY_SIZE(da9052_regulator_info); i++) {
> + info = &da9052_regulator_info[i];
> + if (info->reg_desc.id == id)
> + return info;
> + }
> + } else {
> + for (i = 0; i < ARRAY_SIZE(da9053_regulator_info); i++) {
> + info = &da9053_regulator_info[i];
> + if (info->reg_desc.id == id)
> + return info;
> + }
> + }
This would be better written as a switch statement.
> + regulator = kzalloc(sizeof(struct da9052_regulator), GFP_KERNEL);
> + if (!regulator)
> + return -ENOMEM;
You should use devm_kzalloc().
prev parent reply other threads:[~2011-12-14 18:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-09 14:18 [Patch 06/06] Regulator: DA9052/53 Regulator support v5 Ashish Jangam
2011-12-14 18:02 ` Mark Brown [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=20111214180243.GA19898@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=ashish.jangam@kpitcummins.com \
--cc=dajun.chen@diasemi.com \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=paul.liu@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;
as well as URLs for NNTP newsgroup(s).