jz4740-battery: Protect against concurrent battery readings
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 11 Nov 2010 18:00:52 +0000 (19:00 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 23:14:25 +0000 (15:14 -0800)
commitfcd8c1ff604201722610d43c01a1cf035e2ea273
tree182b32dc7904557d9fbe0d95afc050b20f4ab82e
parentab8ce49d8f83d9e8bf725bb9ba74f04037779720
jz4740-battery: Protect against concurrent battery readings

commit 8ec98fe0b4ffdedce4c1caa9fb3d550f52ad1c6b upstream.

We can not handle more then one ADC request at a time to the battery.
The patch adds a mutex around the ADC read code to ensure this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/power/jz4740-battery.c