lkml.org 
[lkml]   [2011]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/7] regmap: Properly round cache_word_size
On Wed, Nov 16, 2011 at 04:28:18PM +0100, Lars-Peter Clausen wrote:

> + if (config->val_bits <= 8)
> + map->cache_word_size = 1;
> + else if (config->val_bits <= 16)
> + map->cache_word_size = 2;
> + else
> + return -EINVAL;

Just do val_bits + 7 if you're going to do this.


\
 
 \ /
  Last update: 2011-11-16 17:17    [W:0.597 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site