[PATCH v2] MAX8952 PMIC Driver Initial Release

Kukjin Kim kgene.kim at samsung.com
Wed Sep 1 06:05:39 EDT 2010


Mark Brown wrote:
> 
> On Wed, Sep 01, 2010 at 06:44:11PM +0900, Kukjin Kim wrote:
> 
> > MM...but I'm not sure if I can submit other patch for max8952...
> > Actually, Mr. Ham's max8952 code has been applied by Liam.
> 
> We can always remove that if it makes more sense to combine the code.
> 
> > -	return (MAX8649_DCDC_VMIN + index * MAX8649_DCDC_STEP);
> > +	struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
> > +	int ret = MAX8649_DCDC_VMIN + index * MAX8649_DCDC_STEP;
> > +
> > +	if (!strcmp(info->i2c->name, "max8952"))
> 
> Rather than doing a strcmp on the name you should use the id field here:
> 
Ok..will fix it.

> >  static const struct i2c_device_id max8649_id[] = {
> >  	{ "max8649", 0 },
> > +	{ "max8952", 0 },
> >  	{ }
> >  };
> 
> to pass in a value which you compare against.  While it's probably not a
> performance issue on this chip this is much clearer and more idiomatic.

Thanks for your review and suggestion.
Will submit as per your comments.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim at samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.




More information about the linux-arm-kernel mailing list