linux_dsm_epyc7002/drivers/base/regmap
Geert Uytterhoeven cf673fbc63 regmap: Split regmap_get_endian() in two functions
Split regmap_get_endian() in two functions, regmap_get_reg_endian() and
regmap_get_val_endian().

This allows to:
  - Get rid of the three switch()es on "type", incl. error handling in
    three "default" cases,
  - Get rid of the regmap_endian_type enum,
  - Get rid of the non-NULL check of "config" (regmap_init() already
    checks for that),
  - Get rid of the "endian" output parameters, and just return the
    regmap_endian enum value, as the functions can no longer fail.

This saves 21 lines of code (despite the still-present
one-comment-per-line over-documentation), and 30 bytes of code on ARM
V7.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 17:45:56 +01:00
..
internal.h regmap: Implementation for regmap_multi_reg_write 2014-03-10 17:09:32 +00:00
Kconfig regmap: add SPMI support 2013-10-28 12:51:43 -07:00
Makefile regmap: add SPMI support 2013-10-28 12:51:43 -07:00
regcache-flat.c regmap: flat: Add flat cache type 2013-01-02 10:58:53 +00:00
regcache-lzo.c regmap: cache: Pass the map rather than the word size when updating values 2013-03-04 10:30:27 +08:00
regcache-rbtree.c regmap: rbtree: improve 64bits memory alignment 2014-04-14 16:59:48 +01:00
regcache.c Merge remote-tracking branches 'regmap/topic/cache', 'regmap/topic/irq', 'regmap/topic/lock', 'regmap/topic/mmio', 'regmap/topic/nodev', 'regmap/topic/parse-val' and 'regmap/topic/patch' into regmap-next 2014-03-28 11:50:43 +00:00
regmap-debugfs.c regmap: debugfs: "registers" & "access" for single register maps 2014-02-03 12:16:24 +00:00
regmap-i2c.c regmap: add DT endianness binding support. 2014-08-16 16:56:23 -05:00
regmap-irq.c regmap: irq: Fix possible ZERO_SIZE_PTR pointer dereferencing error. 2014-05-26 16:37:04 +01:00
regmap-mmio.c Merge remote-tracking branches 'regmap/topic/irq', 'regmap/topic/le', 'regmap/topic/mmio' and 'regmap/topic/rbtree' into regmap-next 2014-06-02 17:07:39 +01:00
regmap-spi.c regmap: add DT endianness binding support. 2014-08-16 16:56:23 -05:00
regmap-spmi.c regmap: spmi: support base and extended register spaces 2014-02-15 11:55:28 -08:00
regmap.c regmap: Split regmap_get_endian() in two functions 2014-08-27 17:45:56 +01:00