summaryrefslogtreecommitdiff
path: root/drivers/base/hypervisor.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-08-19 16:49:07 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:36:33 (GMT)
commit9cc091a16151c080f0f45ec3199c1bc5b9b51d49 (patch)
treed8a4201353816fe35bfdc669cf201d73236e8b30 /drivers/base/hypervisor.c
parenta5749bf256d6ae6272f46feddbfcaa577505aaf8 (diff)
downloadlinux-fsl-qoriq-9cc091a16151c080f0f45ec3199c1bc5b9b51d49.tar.xz
regmap: of_regmap_get_endian() cleanup
Commit d647c199510c ("regmap: add DT endianness binding support") had some issues. Commit ba1b53feb8ca ("regmap: Fix DT endianess parsing logic") fixed the main problem. This patch fixes the other. Specifically, restore the overall default of REGMAP_ENDIAN_BIG if none of the config, DT, or the bus specify any endianness. Without this, of_regmap_get_endian() could return REGMAP_ENDIAN_DEFAULT, which the calling code can't handle. Since all busses do specify an endianness in the current code, this makes no difference right now, but I saw no justification in the patch description for removing this final default. Also, clean up the code a bit: * s/of_regmap_get_endian/regmap_get_endian/ since the function isn't DT- specific, even if the reason it was originally added was to add some DT-specific features. * After potentially reading an endianess specification from DT, the code checks whether DT did specify an endianness, and if so, returns it. Move this test outside the whole switch statement so that if the REGMAP_ENDIAN_REG case ever modifies *endian, this check will pick that up. This partially reverts part of commit ba1b53feb8ca ("regmap: Fix DT endianess parsing logic"), while maintaining the bug-fix that commit made to this code. * Make the comments briefer, and only refer to the specific action taken at their location. This makes most of the comments independent of DT, and easier to follow. Cc: Xiubo Li <Li.Xiubo@freescale.com> Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Cc: Thierry Reding <treding@nvidia.com> Fixes: d647c199510c ("regmap: add DT endianness binding support") Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org> --- This patch is pulled back from upstream: commit 45e1a279ce1d2ff9b2b2fedf4cdced10c7ca3ab5 Change-Id: I7c53af02317b6cb52b42ed0dc7b5d8d77eaccc92 Reviewed-on: http://git.am.freescale.net:8181/19858 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'drivers/base/hypervisor.c')
0 files changed, 0 insertions, 0 deletions