]> git.karo-electronics.de Git - linux-beck.git/commit
jz4740-battery: Correct voltage change check
authorMaarten ter Huurne <maarten@treewalker.org>
Sun, 28 Feb 2016 16:05:48 +0000 (17:05 +0100)
committerSebastian Reichel <sre@kernel.org>
Thu, 3 Mar 2016 14:05:08 +0000 (15:05 +0100)
commit754645342a35e422782f7a59545448ff9e933739
tree74837f3873a2d34b2d089b13d48dbe2321386312
parent9052768fe4a4ca773e48654b1dc4297a298e76b9
jz4740-battery: Correct voltage change check

The check is supposed to avoid redundant update notifications, so it
should check for the difference between old and new voltage exceeding
a threshold.

Also make sure the result of a failed read is never stored.

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/jz4740-battery.c