Hi Russell

> +static int dove_calc_divider(const struct dove_clk *dc, unsigned long rate,
> +                          unsigned long parent_rate, bool set)
> +{
> +     unsigned int divider, max;
> +
> +     divider = DIV_ROUND_CLOSEST(parent_rate, rate);
> +
> +     if (dc->divider_table) {
> +             unsigned int i;
> +
> +             for (i = 0; dc->divider_table[i]; i++)
> +                     if (divider == dc->divider_table[i]) {
> +                             divider = i;
> +                             break;
> +                     }
> +
> +             if (dc->divider_table[i])
> +                     return -EINVAL;

Is this condition correct? If we have reached the 0 at the end of the
table, -EINVAL makes sense. But that would need a !

       Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to