power_supply: max17042: Use regmap_update_bits instead read and write
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Tue, 24 Feb 2015 09:54:47 +0000 (10:54 +0100)
committerSebastian Reichel <sre@kernel.org>
Wed, 25 Feb 2015 20:45:46 +0000 (21:45 +0100)
commitbc352686f6801592b4f4a53d8008e80931684c84
tree959b0573e9fea8851d37f19f55de8f38e544203a
parent52fa74ee690e6491295ac221c83c56563257f294
power_supply: max17042: Use regmap_update_bits instead read and write

Consolidate regmap_read() and regmap_write() into one
regmap_update_bits() call. This is more readable and safer because
regmap's mutex will prevent any concurrent access to modified registers
(the concurrent access could happen through max17042_init_chip() in
scheduled work).

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/max17042_battery.c