Hi Sergei,
On Tue, Jul 20, 2010 at 17:56:54, Sergei Shtylyov wrote:
> Hello.
>
> Sekhar Nori wrote:
>
[...]
> > +int davinci_set_sysclk_rate(struct clk *clk, unsigned long rate)
> > +{
> [...]
> > + if (input > rate) {
> > + /*
> > + * Can afford to provide an output little higher than requested
> > + * only if maximum rate supported by hardware on this sysclk
> > + * is known.
> > + */
> > + if (clk->maxrate) {
> > + ratio = DIV_ROUND_CLOSEST(input, rate);
> > + if (input / ratio > clk->maxrate)
> > + ratio = 0;
> > + }
> > +
> > + if (ratio == 0)
> > + ratio = DIV_ROUND_UP(input, rate);
> > +
> > + ratio = ratio - 1;
>
> Why not simply ratio--? It's C after all. :-)
>
Sure, will change. :)
Regards,
Sekhar
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source