lkml.org 
[lkml]   [2014]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 04/15] clk: divider: Make generic for usage elsewhere
On 09/05/14 15:47, Stephen Boyd wrote:
> +
> +int divider_get_val(unsigned long rate, unsigned long parent_rate,
> + const struct clk_div_table *table, u8 width,
> + unsigned long flags)
> +{
> unsigned int div, value;
> - unsigned long flags = 0;
> - u32 val;
>
> div = DIV_ROUND_UP(parent_rate, rate);
>
> - if (!_is_valid_div(divider, div))
> + if (!_is_valid_div(table, div, flags))
> return -EINVAL;
>
> - value = _get_val(divider, div);
> + value = _get_val(table, div, flags);
> +
> + min_t(unsigned int, value, div_mask(width));
> +
> + return 0;

This should be return value, not return 0.

> +}
> +EXPORT_SYMBOL_GPL(divider_get_val);
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation



\
 
 \ /
  Last update: 2014-10-03 20:41    [W:0.184 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site