[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20111214180243.GA19898@opensource.wolfsonmicro.com>
Date: Thu, 15 Dec 2011 02:02:45 +0800
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Ashish Jangam <ashish.jangam@...tcummins.com>
Cc: linaro-dev@...ts.linaro.org, lrg@...mlogic.co.uk,
linux-kernel@...r.kernel.org, Dajun <dajun.chen@...semi.com>,
paul.liu@...aro.org
Subject: Re: [Patch 06/06] Regulator: DA9052/53 Regulator support v5
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().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists