regmap: Fixes for v5.9

Two issues here - one is a fix for use after free issues in the case
where a regmap overrides its name using something dynamically generated,
the other is that we weren't handling access checks non-incrementing I/O
on registers within paged register regions correctly resulting in
spurious errors.  Both of these are quite rare but serious if they
occur.
regmap: fix page selection for noinc writes

Non-incrementing writes can fail if register + length crosses page
border. However for non-incrementing writes we should not check for page
border crossing. Fix this by passing additional flag to _regmap_raw_write
and passing length to _regmap_select_page basing on the flag.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fixes: cdf6b11daa77 ("regmap: Add regmap_noinc_write API")
Link: https://lore.kernel.org/r/20200917153405.3139200-2-dmitry.baryshkov@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 files changed