]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: max17042_battery: fix model download bug.
authorSven Van Asbroeck <thesven73@gmail.com>
Fri, 12 Aug 2016 13:10:27 +0000 (09:10 -0400)
committerSebastian Reichel <sre@kernel.org>
Fri, 12 Aug 2016 20:42:25 +0000 (22:42 +0200)
commitf9695c0a83a0ec0435c840a67809e70102af7160
treea740ad125b8dbf4436b1e6fc8d8570d97e66dd46
parentb482605f7939bd4035b2d11a7952dc3da5821c6d
power: supply: max17042_battery: fix model download bug.

The device's model download function returns the model data as
an array of u32s, which is later compared to the reference
model data. However, since the latter is an array of u16s,
the comparison does not happen correctly, and model verification
fails. This in turn breaks the POR initialization sequence.

Fixes: 8a0cb75bdc8c1 ("max17042_battery: Support regmap to access device's registers")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sven Van Asbroeck <TheSven73@googlemail.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/max17042_battery.c