[UPSTREAM PATCH] glamo_mci_use_regulator_api.patch

Balaji Rao balajirrao at openmoko.org
Wed Oct 29 20:34:30 CET 2008


On Wed, Oct 29, 2008 at 07:30:07PM +0000, Mark Brown wrote:
> On Wed, Oct 29, 2008 at 08:46:33PM +0530, Balaji Rao wrote:
> 
> Not a detailed review but...
> 
> > +			.num_consumer_supplies = 1,
> > +			.consumer_supplies = hcldo_consumers,
> 
> It's a bit more idiomatic to use ARRAY_SIZE() for num_consumer_supplies,
> if only to avoid someone having to look back to the declaration of the
> supply array to check the count.
> 
> > +	host->regulator = regulator_get(&pdev->dev, "SD_3V3");
> > +	if (!host->regulator) {
> > +		dev_err(&pdev->dev, "Cannot proceed without regulator.\n");
> > +		return -ENODEV;
> > +	}
> 
> regulator_get() returns an ERR_PTR() so you should check with IS_ERR().

OK, will do.

Thank's for the review. Looking forward for a detailed one :)

	- Balaji



More information about the openmoko-kernel mailing list