regmap: mmio: Fix regmap_mmio_write for uneven counts
authorPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 16 May 2014 14:25:34 +0000 (16:25 +0200)
committerMark Brown <broonie@linaro.org>
Mon, 26 May 2014 15:56:02 +0000 (16:56 +0100)
commit2e804b7c72d4efd2318428a2c1e40fd0e173c487
treec4de0887bd10633a9076228deeeeab7a5559362e
parentb48d13988bee440e43a510ea8878f1f329cee189
regmap: mmio: Fix regmap_mmio_write for uneven counts

Commit 932580409a9dacbf42215fa737bf06ae2c0aa624
"regmap: mmio: Add support for 1/2/8 bytes wide register address."
broke regmap_mmio_write for uneven counts, for example 32-bit register
addresses with no padding and 8-byte values (count = 5).
Fix this by allowing all counts large enough to include some value.
This check was BUG_ON(count < 4) before the last change.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/base/regmap/regmap-mmio.c