]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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 22:47:07 +0000 (14:47 -0800)
commitcbedbe4b52739b6228144f4457afc22d2d1bcc3d
tree9f3a3ddfc81565aa017a463811df5dbc3f05c0cf
parent2138fe2a0ddb182cd6e316ee95b3b8ac174dfd89
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