regmap: Properly round cache_word_size
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 16 Nov 2011 19:34:03 +0000 (20:34 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 17 Nov 2011 16:51:23 +0000 (16:51 +0000)
commit064d4db11e23949c40b8a2f2f6be11c131b53932
treea61edaa49618b7189a01fa9bb1a9c19e5cfda625
parent7e5ec63ef574775900c82bd98f95bf039f513de3
regmap: Properly round cache_word_size

regcache currently only properly works with val bit sizes of 8 or 16, since
it will, when calculating the cache word size, round down. This causes the
cache storage to be too small to hold the full register value. Fix this by
rounding up instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/base/regmap/regcache.c