Hi, > -----Original Message----- > From: Sergei Shtylyov [mailto:sshtyl...@ru.mvista.com] > Sent: Tuesday, November 17, 2009 9:12 PM > To: Gupta, Ajay Kumar > Cc: linux-...@vger.kernel.org; davinci-linux-open- > sou...@linux.davincidsp.com; coolo...@kernel.org; felipe.ba...@nokia.com; > linux-o...@vger.kernel.org; Gadiyar, Anand > Subject: Re: [PATCH 2/8] musb: Get power (mA) from board data > > Hello. > > Ajay Kumar Gupta wrote: > > > Different board may have different power sourcing capability and > > now with 'struct musb_hdrc_board_data' in place; pass this data > > from board files and also modify musb_core.c to get 'power' data > > from 'plat->board_data'. > > This should be part of the patch 1/8 to keep the code compiling. > > > Signed-off-by: Ajay Kumar Gupta <ajay.gu...@ti.com> > > > diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c > > index 3a61ddb..818ccda 100644 > > --- a/drivers/usb/musb/musb_core.c > > +++ b/drivers/usb/musb/musb_core.c > > @@ -2033,7 +2033,9 @@ bad_config: > > if (is_otg_enabled(musb)) > > hcd->self.otg_port = 1; > > musb->xceiv->host = &hcd->self; > > - hcd->power_budget = 2 * (plat->power ? : 250); > > + if (plat->board_data) > > + hcd->power_budget = > > + 2 * (plat->board_data->power ? : 250); > > Shouldn't it be: > > + > + hcd->power_budget = 2 * (plat->board_data && > + plat->board_data->power ? > + plat->board_data->power : 250);
But the next patch on 'extvbus' would again need a check for ' plat->board_data ' so added both in same 'if' check. -Ajay > > WBR, Sergei _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source