lkml.org 
[lkml]   [2011]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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().


\
 
 \ /
  Last update: 2011-12-14 19:05    [W:0.030 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site