drivers/gpio/pca953x.c: add a mutex to fix race condition
authorRoland Stigge <stigge@antcom.de>
Thu, 10 Feb 2011 23:01:23 +0000 (15:01 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 12 Feb 2011 00:12:20 +0000 (16:12 -0800)
commit6e20fb18054c179d7e64c0af43d855b9310a3394
tree7fe6eda33162dbeab61afc2392229b9c57a644f1
parent01e05e9a90b8f4c3997ae0537e87720eb475e532
drivers/gpio/pca953x.c: add a mutex to fix race condition

Add a mutex to register communication and handling.  Without the mutex,
GPIOs didn't switch as expected when toggled in a fast sequence of
status changes of multiple outputs.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Marc Zyngier <maz@misterjones.org>
Cc: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/gpio/pca953x.c