regulator: ltc3676: Simplify .readable_reg and .writable_reg callbacks
authorAxel Lin <axel.lin@ingics.com>
Fri, 15 Feb 2019 11:54:20 +0000 (19:54 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 15 Feb 2019 17:37:51 +0000 (17:37 +0000)
commit502aba81aa61393d798cdaabfaa9cba334b9f3d0
treefd4f48e9beb17f653cffb0baa2c4f4d1a5917c27
parent049369d464289bb57bcfb6faa20990a06fe1e7ae
regulator: ltc3676: Simplify .readable_reg and .writable_reg callbacks

Use case range for continuous range to make the code shorter.
The .readable_reg and .writable_reg implementation are exactly the same,
so use a common ltc3676_readable_writeable_reg function instead.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/ltc3676.c