regmap: Fix the size calculation for map->format.buf_size
authorFabio Estevam <fabio.estevam@freescale.com>
Fri, 1 Jun 2012 00:10:30 +0000 (21:10 -0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 3 Jun 2012 12:14:01 +0000 (13:14 +0100)
The word to be transmitted/received via regmap is composed by the following
parts:

config->reg_bits
config->val_bits
config->pad_bits

,so the total size should be calculated by summing up the number of bits of
each element and using a DIV_ROUND_UP to return the number of bytes.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

No differences found