RE: [Patch 5/11] Regulator: DA9052 regulator support v3

From: Ashish Jangam
Date: Fri Oct 07 2011 - 06:20:43 EST


> -----Original Message-----
> From: Ying-Chun Liu (PaulLiu) [mailto:paul.liu@xxxxxxxxxx]
> Sent: Friday, October 07, 2011 2:54 PM
> To: Ashish Jangam
> Cc: Mark Brown; Dajun; linaro-dev@xxxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; lrg@xxxxxxxxxxxxxxx
> Subject: Re: [Patch 5/11] Regulator: DA9052 regulator support v3
>
> (2011å07æ06æ 18:36), ashishj3 wrote:
> > +static int __devinit da9052_regulator_probe(struct platform_device *pdev)
> > +{
> > + struct da9052_regulator *regulator;
> > + struct da9052 *da9052;
> > + struct da9052_pdata *pdata;
> > + int ret;
> > +
> > + regulator = kzalloc(sizeof(struct da9052_regulator), GFP_KERNEL);
> > + if (!regulator)
> > + return -ENOMEM;
> > +
> > + da9052 = dev_get_drvdata(pdev->dev.parent);
> > + pdata = da9052->dev->platform_data;
> > +
> > + regulator->info = find_regulator_info(pdev->id);
> > + if (regulator->info == NULL) {
> > + dev_err(&pdev->dev, "invalid regulator ID specified\n");
> > + ret = -EINVAL;
> > + goto err;
> > + }
> > +
> > + regulator->rdev = regulator_register(&regulator->info->reg_desc,
> > + &pdev->dev,
> > + pdata->regulators[pdev->id],
> > + regulator);
> > + if (IS_ERR(regulator->rdev)) {
> > + dev_err(&pdev->dev, "failed to register regulator %s\n",
> > + regulator->info->reg_desc.name);
> > + ret = PTR_ERR(regulator->rdev);
> > + goto err;
> > + }
> > +
> > + platform_set_drvdata(pdev, regulator);
> > +
> > + return 0;
> > +err:
> > + kfree(regulator);
> > + return ret;
> > +}
>
> Hi Ashish,
>
> It seems to me that in this function, regulator->da9052 isn't initialized.
>
Today I'm going to post regulator patch for DA9052 and DA9053 that has got fixes for this and few more bugs.
This patch is thoroughly tested for DA9052 and DA9053.
> Regards,
> Paul



èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—