Hi, > -----Original Message----- > From: Mark Brown [mailto:[email protected]] > Sent: Friday, November 13, 2009 6:25 PM > To: Gupta, Ajay Kumar > Cc: Gadiyar, Anand; [email protected]; [email protected]; > Aggarwal, Anuj > Subject: Re: Query: Regulator framework in EHCI driver > > On Fri, Nov 13, 2009 at 09:52:14AM +0530, Gupta, Ajay Kumar wrote: > > > + snprintf(supply, 7, "hsusb%d", i); > > It'd be better to use sizeof() rather than a hard coded 7 here.
Ok fine. > > > + omap->regulator[i] = regulator_get(omap->dev, supply); > > Looking at your code this needs to be regulator_get_exclusive() - you > conditinoally disable the regulator when unregistering depending on if > it reports as enabled but if the supply is shared then it can be enabled > without this driver having done so. > > Alternatively, make the regulator_disable() in the shutdown path > unconditional. Ok, I will take this change and submit this patch. Thanks, Ajay -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
