Maarten ter Huurne b2c7f5d9c9 regmap: cache: Fix num_reg_defaults computation from reg_defaults_raw
In 3245d460 (regmap: cache: Fall back to register by register read for
cache defaults) non-readable registers are skipped when initializing
reg_defaults, but are still included in num_reg_defaults. So there can
be uninitialized entries at the end of reg_defaults, which can cause
problems when the register cache initializes from the full array.

Fixed it by excluding non-readable registers from the count as well.

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-29 23:02:19 +01:00
..
2015-09-17 06:06:54 -07:00
2016-01-22 18:04:28 -05:00
2016-03-17 13:47:50 -07:00
2015-10-04 19:42:22 +01:00
2014-09-01 13:48:59 +02:00